Commit f9a545ca authored by Stephen Morris's avatar Stephen Morris
Browse files

[trac1008] Address review comments

parent 80dd4335
......@@ -243,7 +243,7 @@ private:
/// before the underlying logging system is initialized. However, any
/// attempt to access a logging method on any logger before initialization -
/// regardless of whether is is statically or automatically declared - will
/// cause an exception to be thrown.
/// cause a "LoggingNotInitialized" exception to be thrown.
///
/// \return Returns pointer to implementation
LoggerImpl* getLoggerPtr() {
......
......@@ -37,14 +37,8 @@ using namespace std;
namespace {
// Flag to hold logging initialization state. This is held inside a function
// to ensure that it is correctly initialized even when referenced during
// program initialization (thus avoiding the "static initialization fiasco").
bool&
loggingInitializationFlag() {
static bool init_flag = false;
return (init_flag);
}
// Flag to hold logging initialization state.
bool logging_init_state = false;
} // Anonymous namespace
......@@ -54,7 +48,7 @@ namespace log {
// Return initialization state.
bool
isLoggingInitialized() {
return (loggingInitializationFlag());
return (logging_init_state);
}
// Set initialization state. (Note: as logging can be initialized via a direct
......@@ -62,11 +56,11 @@ isLoggingInitialized() {
// the initialization functions in this file.
void
setLoggingInitialized(bool state) {
loggingInitializationFlag() = state;
logging_init_state = state;
}
// Logger Run-Time Initialization. This function is present for historical
// reasons.
// Logger Run-Time Initialization.
void
initLogger(const string& root, isc::log::Severity severity, int dbglevel,
const char* file) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment