From e5337663d07f933d1a089c76f6f24b171d0a497e Mon Sep 17 00:00:00 2001 From: Sean Murphy Date: Tue, 4 Dec 2018 14:45:44 +0100 Subject: [PATCH] fixed basic logic flaw relating to test to determine if log output should be generated --- logging.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/logging.go b/logging.go index 183bcfb..d85689f 100644 --- a/logging.go +++ b/logging.go @@ -54,7 +54,7 @@ var ( func (l *logStream) Printf(format string, a ...interface{}) { // describe(a) - if LogLevel >= l.logLevel { + if LogLevel < l.logLevel { return } @@ -80,7 +80,7 @@ func determineLogLevel(lstr string) int { return logLevelStringMap[lstrLowerCase] } -func initLogger(logFile string, logLevelStr string, logToConsole bool) { +func InitLogger(logFile string, logLevelStr string, logToConsole bool) { LogLevel = determineLogLevel(logLevelStr)