src/ping.cpp
/**
 *   Configures console appender.
 *   @param err if true, use stderr, otherwise stdout.
 */
Configures console appender.
@param err if true, use stderr, otherwise stdout.
Configures console appender . @param err if true use stderr otherwise stdout .
static void configure_logger(bool err) {
    log4cxx::ConsoleAppenderPtr appender(new log4cxx::ConsoleAppender());
    if (err) {
        appender->setTarget(LOG4CXX_STR("System.err"));
    }
    log4cxx::LogString default_conversion_pattern(LOG4CXX_STR("%d [%-5p] %c - %m%n"));
    log4cxx::PatternLayoutPtr layout(new log4cxx::PatternLayout(default_conversion_pattern));
    appender->setLayout(layout);
    log4cxx::helpers::Pool pool;
    appender->activateOptions(pool);
    log4cxx::Logger::getRootLogger()->addAppender(appender);
    log4cxx::LogManager::getLoggerRepository()->setConfigured(true);
}
static void configure_logger ( bool err ) { log4cxx :: ConsoleAppenderPtr appender ( new log4cxx :: ConsoleAppender ( ) ) ; if ( err ) { appender -> setTarget ( LOG4CXX_STR ( " " ) ) ; } log4cxx :: LogString default_conversion_pattern ( LOG4CXX_STR ( " " ) ) ; log4cxx :: PatternLayoutPtr layout ( new log4cxx :: PatternLayout ( default_conversion_pattern ) ) ; appender -> setLayout ( layout ) ; log4cxx :: helpers :: Pool pool ; appender -> activateOptions ( pool ) ; log4cxx :: Logger :: getRootLogger ( ) -> addAppender ( appender ) ; log4cxx :: LogManager :: getLoggerRepository ( ) -> setConfigured ( true ) ; }
Configures console appender.
Configures console appender .