Initialize logLevel and logger

This commit is contained in:
Andreas Neue 2016-03-12 13:32:54 +01:00
parent c3edb590df
commit 2c6be95557
1 changed files with 2 additions and 3 deletions

View File

@ -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
}