|
|
@ -1,15 +1,11 @@
|
|
|
|
package log
|
|
|
|
package log
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
|
|
|
"fmt"
|
|
|
|
|
|
|
|
"time"
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Formatter is a interface used to implement a custom Formatter
|
|
|
|
// Formatter is a interface used to implement a custom Formatter
|
|
|
|
type Formatter interface {
|
|
|
|
type Formatter interface {
|
|
|
|
Format(level Level, msg string, logger *Logger) []byte
|
|
|
|
Format(level Level, msg string, logger *Logger) []byte
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
// simpleFormatter is default formmatter
|
|
|
|
// simpleFormatter is default formmatter
|
|
|
|
type simpleFormatter struct {
|
|
|
|
type simpleFormatter struct {
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -19,3 +15,4 @@ func (f *simpleFormatter) Format(level Level, msg string, logger *Logger) []byte
|
|
|
|
time := time.Now().Format("15:04:05.000")
|
|
|
|
time := time.Now().Format("15:04:05.000")
|
|
|
|
return []byte(fmt.Sprintf("%s %s %s\n", time, level.String(), msg))
|
|
|
|
return []byte(fmt.Sprintf("%s %s %s\n", time, level.String(), msg))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
*/
|
|
|
|