1
0
mirror of https://github.com/astaxie/beego.git synced 2025-06-12 10:20:39 +00:00

golint logs

This commit is contained in:
astaxie
2015-09-11 23:08:24 +08:00
parent 657995092a
commit 34877c52a9
6 changed files with 129 additions and 128 deletions

View File

@ -12,7 +12,8 @@ import (
"github.com/belogik/goes"
)
func NewES() logs.LoggerInterface {
// NewES return a LoggerInterface
func NewES() logs.Logger {
cw := &esLogger{
Level: logs.LevelDebug,
}
@ -46,6 +47,7 @@ func (el *esLogger) Init(jsonconfig string) error {
return nil
}
// WriteMsg will write the msg and level into es
func (el *esLogger) WriteMsg(msg string, level int) error {
if level > el.Level {
return nil
@ -63,10 +65,12 @@ func (el *esLogger) WriteMsg(msg string, level int) error {
return err
}
// Destroy is a empty method
func (el *esLogger) Destroy() {
}
// Flush is a empty method
func (el *esLogger) Flush() {
}