------------------------------------------------------------
revno: 1859
committer: Václav Šmilauer <[email protected]>
branch nick: trunk
timestamp: Sun 2009-12-06 00:18:09 +0100
message:
  1. Fix (hopefully) an issue with log4cxx 0.9 reported by build robot.
modified:
  core/main/pyboot.cpp


--
lp:yade
https://code.launchpad.net/~yade-dev/yade/trunk

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to 
https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription.
=== modified file 'core/main/pyboot.cpp'
--- core/main/pyboot.cpp	2009-12-04 21:56:59 +0000
+++ core/main/pyboot.cpp	2009-12-05 23:18:09 +0000
@@ -18,16 +18,16 @@
 	__attribute__((constructor)) void initLog4cxx() {
 		#ifdef LOG4CXX_TRACE
 			log4cxx::LevelPtr debugLevel=log4cxx::Level::getDebug(), infoLevel=log4cxx::Level::getInfo(), warnLevel=log4cxx::Level::getWarn();
-		#else
+			// LOG4CXX_STR: http://old.nabble.com/Link-error-when-using-Layout-on-MS-Windows-td20906802.html
+			log4cxx::LayoutPtr layout(new log4cxx::PatternLayout(LOG4CXX_STR("%-5r %-5p %-10c %m%n")));
+			log4cxx::AppenderPtr appender(new log4cxx::ConsoleAppender(layout));
+			log4cxx::LoggerPtr localLogger=log4cxx::Logger::getLogger("yade");
+			localLogger->addAppender(appender);
+		#else // log4cxx 0.9
 			log4cxx::LevelPtr debugLevel=log4cxx::Level::DEBUG, infoLevel=log4cxx::Level::INFO, warnLevel=log4cxx::Level::WARN;
+			log4cxx::BasicConfigurator::configure();
+			log4cxx::LoggerPtr localLogger=log4cxx::Logger::getLogger("yade");
 		#endif
-		//log4cxx::BasicConfigurator::configure();
-
-		// LOG4CXX_STR: http://old.nabble.com/Link-error-when-using-Layout-on-MS-Windows-td20906802.html
-		log4cxx::LayoutPtr layout(new log4cxx::PatternLayout(LOG4CXX_STR("%-5r %-5p %-10c %m%n")));
-		log4cxx::AppenderPtr appender(new log4cxx::ConsoleAppender(layout));
-		log4cxx::LoggerPtr localLogger=log4cxx::Logger::getLogger("yade");
-		localLogger->addAppender(appender);
 		localLogger->setLevel(getenv("YADE_DEBUG")?debugLevel:warnLevel);
 		LOG4CXX_DEBUG(localLogger,"Log4cxx initialized.");
 	}

_______________________________________________
Mailing list: https://launchpad.net/~yade-dev
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to