mirror of
https://github.com/eosswedenorg/thalos
synced 2026-06-26 10:43:42 +02:00
app/config/config.go: add logging config
This commit is contained in:
parent
19a84b77fb
commit
de266da33c
2 changed files with 16 additions and 0 deletions
|
|
@ -2,6 +2,9 @@ package config
|
|||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"time"
|
||||
|
||||
"github.com/eosswedenorg/thalos/app/log"
|
||||
|
||||
"gopkg.in/yaml.v3"
|
||||
|
||||
|
|
@ -34,6 +37,8 @@ type Config struct {
|
|||
Ship ShipConfig `yaml:"ship"`
|
||||
Api string `yaml:"api"`
|
||||
|
||||
Log log.Config `yaml:"log"`
|
||||
|
||||
Redis RedisConfig `yaml:"redis"`
|
||||
MessageCodec string `yaml:"message_codec"`
|
||||
|
||||
|
|
@ -43,6 +48,10 @@ type Config struct {
|
|||
func Parse(data []byte) (*Config, error) {
|
||||
cfg := Config{
|
||||
MessageCodec: "json",
|
||||
Log: log.Config{
|
||||
MaxFileSize: 10 * 1000 * 1000, // 10 mb
|
||||
MaxTime: time.Hour * 24,
|
||||
},
|
||||
Ship: ShipConfig{
|
||||
StartBlockNum: shipclient.NULL_BLOCK_NUMBER,
|
||||
EndBlockNum: shipclient.NULL_BLOCK_NUMBER,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue