Skip to content
This repository
Browse code

Ensure the root logger's log level is set.

  • Loading branch information...
commit 3ad0dda38df9185ac1d2bad2e1434679495cf4b6 1 parent 4bc360a
Andrew Brampton authored October 28, 2012

Showing 1 changed file with 5 additions and 4 deletions. Show diff stats Hide diff stats

  1. 9  src/main.cpp
9  src/main.cpp
@@ -255,11 +255,12 @@ int main (int argc, char *argv[]) {
255 255
 		loglevel = min(loglevel, 2);
256 256
 	}
257 257
 
  258
+	Logger root = Logger::getRoot();
258 259
 	switch (loglevel) {
259  
-		case 2:  logger.setLogLevel(TRACE_LOG_LEVEL); break;
260  
-		case 1:  logger.setLogLevel(DEBUG_LOG_LEVEL); break;
261  
-		default: logger.setLogLevel(INFO_LOG_LEVEL); break;
262  
-		case -1: logger.setLogLevel(FATAL_LOG_LEVEL); break;
  260
+		case 2:  root.setLogLevel(TRACE_LOG_LEVEL); break;
  261
+		case 1:  root.setLogLevel(DEBUG_LOG_LEVEL); break;
  262
+		default: root.setLogLevel(INFO_LOG_LEVEL); break;
  263
+		case -1: root.setLogLevel(FATAL_LOG_LEVEL); break;
263 264
 	}
264 265
 
265 266
 	try {

0 notes on commit 3ad0dda

Please sign in to comment.
Something went wrong with that request. Please try again.