pkg/config/logging.go

23 lines
421 B
Go
Raw Normal View History

2023-04-09 15:14:24 +00:00
package config
// LogConf : config for logging
type LogConf struct {
Level string `yaml:"level"`
File string `yaml:"file"`
Stderr bool `yaml:"stderr"`
CmdFile string `yaml:"-"`
CmdLevel string `yaml:"-"`
}
// Init : init default logging config
func (c *LogConf) Init() error {
// only for development
c.Level = "info"
c.File = ""
c.Stderr = true
c.CmdFile = ""
c.CmdLevel = "info"
return nil
}