mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-30 21:45:37 +00:00
[2445] Don't replace appenders in processSpecification()
slightly changed outer layer process() call so it isn't necessary anymore
This commit is contained in:
@@ -93,7 +93,7 @@ public:
|
|||||||
void process() {
|
void process() {
|
||||||
// empty iterator; set defaults
|
// empty iterator; set defaults
|
||||||
const LoggerSpecification spec;
|
const LoggerSpecification spec;
|
||||||
processSpecification(spec);
|
process(spec);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// \brief Run-Time Initialization
|
/// \brief Run-Time Initialization
|
||||||
|
@@ -70,11 +70,10 @@ LoggerManagerImpl::processSpecification(const LoggerSpecification& spec) {
|
|||||||
// Set the additive flag.
|
// Set the additive flag.
|
||||||
logger.setAdditivity(spec.getAdditive());
|
logger.setAdditivity(spec.getAdditive());
|
||||||
|
|
||||||
// Replace all appenders for this logger.
|
|
||||||
logger.removeAllAppenders();
|
|
||||||
|
|
||||||
// Output options given?
|
// Output options given?
|
||||||
if (spec.optionCount() > 0) {
|
if (spec.optionCount() > 0) {
|
||||||
|
// Replace all appenders for this logger.
|
||||||
|
logger.removeAllAppenders();
|
||||||
|
|
||||||
// Now process output specifications.
|
// Now process output specifications.
|
||||||
for (LoggerSpecification::const_iterator i = spec.begin();
|
for (LoggerSpecification::const_iterator i = spec.begin();
|
||||||
@@ -102,10 +101,6 @@ LoggerManagerImpl::processSpecification(const LoggerSpecification& spec) {
|
|||||||
i->destination);
|
i->destination);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
// If no output options are given, use a default appender
|
|
||||||
OutputOption opt;
|
|
||||||
createConsoleAppender(logger, opt);
|
|
||||||
}
|
}
|
||||||
// Should anything be left in the buffer, this is the time to flush it.
|
// Should anything be left in the buffer, this is the time to flush it.
|
||||||
getLogBuffer().flush();
|
getLogBuffer().flush();
|
||||||
|
Reference in New Issue
Block a user