template<Orientation orientation> void generic_simple_layout(int available_primary, int available_secondary, int content_primary, int content_secondary) { if(orientation == Horizontal) simple_layout(available_primary, available_secondary, content_primary, content_secondary); else simple_layout(available_secondary, available_primary, content_secondary, content_primary); }
void LoggerWrapper::initialize() { log4cxx::LogManager::getLoggerRepository()->setConfigured(true); log4cxx::LoggerPtr root = log4cxx::Logger::getRootLogger(); // the default format is "%r [%t] %p %c %x - %m%n" // %r -> time // %t -> name of the thread // %p -> log level // %c -> logger name // %x -> nested context (usuallh null) // %m -> message // %n -> new line static const log4cxx::LogString default_pattern(LOG4CXX_STR("[%p] [%c] %m%n")); static const log4cxx::LogString simple_pattern(LOG4CXX_STR("%m%n")); log4cxx::LayoutPtr default_layout(new log4cxx::PatternLayout(default_pattern)); log4cxx::AppenderPtr default_appender(new log4cxx::ConsoleAppender(default_layout)); log4cxx::LayoutPtr simple_layout(new log4cxx::PatternLayout(simple_pattern)); log4cxx::AppenderPtr simple_appender(new log4cxx::ConsoleAppender(simple_layout)); // configure the default appender root->addAppender(simple_appender); // log level: TRACE -> DEBUG -> INFO -> WARN -> ERROR -> FATAL // configure the default log level root->setLevel(log4cxx::Level::getDebug()); // configure each logger independently // Compiler->setLevel(log4cxx::Level::getError()); // Resolver->setLevel(log4cxx::Level::getError()); // TransformerStage->setLevel(log4cxx::Level::getError()); // GeneratorStage->setLevel(log4cxx::Level::getError()); // CompilerLogger->setLevel(log4cxx::Level::getError()); }