BIND 10 trac1008, updated. f9a545ca4c82e51fc7c47793fec34eb5deb19e46 [trac1008] Address review comments
BIND 10 source code commits
bind10-changes at lists.isc.org
Fri Jun 17 13:38:25 UTC 2011
The branch, trac1008 has been updated
via f9a545ca4c82e51fc7c47793fec34eb5deb19e46 (commit)
from 80dd433545aecf82aa178365dbc6e0650e12907b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit f9a545ca4c82e51fc7c47793fec34eb5deb19e46
Author: Stephen Morris <stephen at isc.org>
Date: Fri Jun 17 14:37:45 2011 +0100
[trac1008] Address review comments
-----------------------------------------------------------------------
Summary of changes:
src/lib/log/logger.h | 2 +-
src/lib/log/logger_support.cc | 18 ++++++------------
2 files changed, 7 insertions(+), 13 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/log/logger.h b/src/lib/log/logger.h
index cc30520..96168c0 100644
--- a/src/lib/log/logger.h
+++ b/src/lib/log/logger.h
@@ -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() {
diff --git a/src/lib/log/logger_support.cc b/src/lib/log/logger_support.cc
index c81f531..73323a0 100644
--- a/src/lib/log/logger_support.cc
+++ b/src/lib/log/logger_support.cc
@@ -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) {
More information about the bind10-changes
mailing list