|
|
@ -54,7 +54,7 @@ var ( |
|
|
|
|
|
|
|
|
|
|
|
func (l *logStream) Printf(format string, a ...interface{}) { |
|
|
|
func (l *logStream) Printf(format string, a ...interface{}) { |
|
|
|
// describe(a)
|
|
|
|
// describe(a)
|
|
|
|
if LogLevel >= l.logLevel { |
|
|
|
if LogLevel < l.logLevel { |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -80,7 +80,7 @@ func determineLogLevel(lstr string) int { |
|
|
|
return logLevelStringMap[lstrLowerCase] |
|
|
|
return logLevelStringMap[lstrLowerCase] |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func initLogger(logFile string, logLevelStr string, logToConsole bool) { |
|
|
|
func InitLogger(logFile string, logLevelStr string, logToConsole bool) { |
|
|
|
|
|
|
|
|
|
|
|
LogLevel = determineLogLevel(logLevelStr) |
|
|
|
LogLevel = determineLogLevel(logLevelStr) |
|
|
|
|
|
|
|
|
|
|
|