mirror of
https://github.com/astaxie/beego.git
synced 2025-07-15 06:51:00 +00:00
beego: fix log output when SetLogger has error
This commit is contained in:
@ -43,6 +43,9 @@ func NewConsole() LoggerInterface {
|
||||
// init console logger.
|
||||
// jsonconfig like '{"level":LevelTrace}'.
|
||||
func (c *ConsoleWriter) Init(jsonconfig string) error {
|
||||
if len(jsonconfig) == 0 {
|
||||
return nil
|
||||
}
|
||||
err := json.Unmarshal([]byte(jsonconfig), c)
|
||||
if err != nil {
|
||||
return err
|
||||
|
Reference in New Issue
Block a user