23 lines
421 B
Go
23 lines
421 B
Go
|
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
|
||
|
}
|