Initialize logLevel and logger
This commit is contained in:
parent
c3edb590df
commit
2c6be95557
5
xlog.go
5
xlog.go
|
@ -25,8 +25,8 @@ var levelNames = map[int]string{
|
|||
DEBUG: "[DBG] ",
|
||||
}
|
||||
|
||||
var logLevel int
|
||||
var logger *log.Logger
|
||||
var logLevel = DEBUG
|
||||
var logger = log.New(&LogWriter{}, "", log.Ldate|log.Ltime)
|
||||
|
||||
type LogWriter struct {
|
||||
}
|
||||
|
@ -37,7 +37,6 @@ func (w *LogWriter) Write(buf []byte) (int, error) {
|
|||
}
|
||||
|
||||
func Init(lvl int) {
|
||||
logger = log.New(&LogWriter{}, "", log.Ldate|log.Ltime)
|
||||
logLevel = lvl
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue