mirror of
https://github.com/astaxie/beego.git
synced 2025-07-13 23:31:01 +00:00
beego: fix log output when SetLogger has error
This commit is contained in:
@ -38,6 +38,9 @@ func NewSmtpWriter() LoggerInterface {
|
||||
// "level":LevelError
|
||||
// }
|
||||
func (s *SmtpWriter) Init(jsonconfig string) error {
|
||||
if len(jsonconfig) == 0 {
|
||||
return nil
|
||||
}
|
||||
err := json.Unmarshal([]byte(jsonconfig), s)
|
||||
if err != nil {
|
||||
return err
|
||||
|
Reference in New Issue
Block a user