1
0
mirror of https://github.com/astaxie/beego.git synced 2025-06-12 11:40:38 +00:00

fix go run hello.go & console log

This commit is contained in:
astaxie
2014-04-04 09:49:55 +08:00
parent f48ca96a7e
commit 3f1de576e4
5 changed files with 7 additions and 12 deletions

View File

@ -29,9 +29,6 @@ func NewConn() LoggerInterface {
// init connection writer with json config.
// json config only need key "level".
func (c *ConnWriter) Init(jsonconfig string) error {
if len(jsonconfig) == 0 {
return nil
}
err := json.Unmarshal([]byte(jsonconfig), c)
if err != nil {
return err

View File

@ -90,9 +90,6 @@ func NewFileWriter() LoggerInterface {
// "rotate":true
// }
func (w *FileLogWriter) Init(jsonconfig string) error {
if len(jsonconfig) == 0 {
return nil
}
err := json.Unmarshal([]byte(jsonconfig), w)
if err != nil {
return err

View File

@ -38,9 +38,6 @@ 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