Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
ISC Open Source Projects
Kea
Commits
bf254452
Commit
bf254452
authored
Sep 23, 2014
by
Tomek Mrugalski
🛰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[3591] Logging::applyDefaultConfiguration() removed.
parent
ce261a6b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
23 deletions
+7
-23
src/lib/dhcpsrv/daemon.cc
src/lib/dhcpsrv/daemon.cc
+7
-7
src/lib/dhcpsrv/logging.cc
src/lib/dhcpsrv/logging.cc
+0
-8
src/lib/dhcpsrv/logging.h
src/lib/dhcpsrv/logging.h
+0
-8
No files found.
src/lib/dhcpsrv/daemon.cc
View file @
bf254452
...
...
@@ -61,15 +61,11 @@ void Daemon::configureLogger(const isc::data::ConstElementPtr& log_config,
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
;
}
...
...
@@ -80,10 +76,14 @@ void Daemon::configureLogger(const isc::data::ConstElementPtr& log_config,
// 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
);
...
...
@@ -101,7 +101,7 @@ void Daemon::loggerInit(const char* name, bool verbose) {
NULL
);
// Apply default configuration (log INFO or DEBUG to stdout)
LogConfigParser
::
applyDefaultConfiguration
(
verbose
);
isc
::
log
::
setDefaultLoggingOutput
(
verbose
);
}
};
...
...
src/lib/dhcpsrv/logging.cc
View file @
bf254452
...
...
@@ -213,13 +213,5 @@ void LogConfigParser::applyConfiguration() {
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
src/lib/dhcpsrv/logging.h
View file @
bf254452
...
...
@@ -67,14 +67,6 @@ public:
/// @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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment