const ConfigurationPtr& storage,
bool verbose) {
- // This is utility class that translates JSON structures into formats
- // understandable by log4cplus.
- LogConfigParser parser(storage);
-
if (!log_config) {
// There was no logger configuration. Let's clear any config
// and revert to the default.
- parser.applyDefaultConfiguration(verbose); // Set up default logging
+ isc::log::setDefaultLoggingOutput(verbose); // Set up default logging
return;
}
// array in it. Let's clear any old logging configuration
// we may have and revert to the default.
- parser.applyDefaultConfiguration(verbose); // Set up default logging
+ isc::log::setDefaultLoggingOutput(verbose); // Set up default logging
return;
}
+ // This is utility class that translates JSON structures into formats
+ // understandable by log4cplus.
+ LogConfigParser parser(storage);
+
// Translate JSON structures into log4cplus formats
parser.parseConfiguration(loggers, verbose);
NULL);
// Apply default configuration (log INFO or DEBUG to stdout)
- LogConfigParser::applyDefaultConfiguration(verbose);
+ isc::log::setDefaultLoggingOutput(verbose);
}
};
manager.process(specs.begin(), specs.end());
}
-void LogConfigParser::applyDefaultConfiguration(bool verbose) {
- LoggerSpecification spec(isc::log::getRootLoggerName(),
- (verbose?isc::log::DEBUG : isc::log::INFO),
- (verbose?99:0));
-
- setDefaultLoggingOutput(verbose);
-}
-
} // namespace isc::dhcp
} // namespace isc
/// @brief Applies stored configuration
void applyConfiguration();
- /// @brief Configures default logging
- ///
- /// This method is static, so it can be called in the initial phases of
- /// the process start-up.
- ///
- /// @param verbose specifies verbose mode (true forces DEBUG, debuglevel = 99)
- static void applyDefaultConfiguration(bool verbose = false);
-
private:
/// @brief Parses one JSON structure in Logging/loggers" array