add files logger

This commit is contained in:
JessonChan
2016-02-03 16:32:59 +08:00
parent 68cc53e92b
commit 51b1095e73
3 changed files with 78 additions and 8 deletions

View File

@@ -64,6 +64,8 @@ const (
LevelWarn = LevelWarning
)
var levelNames = [...]string{"emergency", "alert", "critical", "error", "warning", "notice", "info", "debug"}
type loggerType func() Logger
// Logger defines the behavior of a log provider.
@@ -109,7 +111,7 @@ type nameLogger struct {
type logMsg struct {
level int
msg string
when time.Time
when time.Time
}
var logMsgPool *sync.Pool