This commit is contained in:
siddontang 2014-03-28 14:11:15 +08:00
parent 7914d78239
commit 333d680f38
1 changed files with 9 additions and 0 deletions

View File

@ -23,6 +23,15 @@ type Logger struct {
handler Handler handler Handler
} }
const (
Ldate = log.Ldate
Ltime = log.Ltime
Lmicroseconds = log.Lmicroseconds
Llongfile = log.Llongfile
Lshortfile = log.Lshortfile
LstdFlags = Ldate | Ltime
)
func New(handler Handler, flag int) *Logger { func New(handler Handler, flag int) *Logger {
var l = new(Logger) var l = new(Logger)
l.logger = log.New(handler, "", flag) //log.LstdFlags|log.Lshortfile) l.logger = log.New(handler, "", flag) //log.LstdFlags|log.Lshortfile)