42int& initDebugLevel() {
43 static int dbglevel = 0;
47std::string& initRootName() {
70LoggerManager::processInit() {
76LoggerManager::processSpecification(
const LoggerSpecification& spec) {
82LoggerManager::processEnd() {
91 int dbglevel,
const char* file,
bool buffer)
100 initRootName() = root;
101 initSeverity() = severity;
102 initDebugLevel() = dbglevel;
132 if (!duplicates.empty()) {
137 for (list<string>::const_iterator i = duplicates.begin();
138 i != duplicates.end(); ++i) {
172 for (MessageReader::MessageIDCollection::const_iterator
173 i = unknown.begin(); i != unknown.end(); ++i) {
174 string message_id = boost::lexical_cast<string>(*i);
185 for (vector<string>::size_type i = 0; i < args.size(); ++i) {
186 error_message = error_message.
arg(args[i]);
Logger Manager Implementation.
static void processSpecification(const LoggerSpecification &spec)
Process Specification.
void processEnd()
End Processing.
static void init(isc::log::Severity severity=isc::log::INFO, int dbglevel=0, bool buffer=false)
Implementation-specific initialization.
static void reset(isc::log::Severity severity=isc::log::INFO, int dbglevel=0)
Reset logging.
void processInit()
Initialize Processing.
static isc::util::thread::Mutex & getMutex()
Return a process-global mutex that's used for mutual exclusion among threads of a single process duri...
static void init(const std::string &root, isc::log::Severity severity=isc::log::INFO, int dbglevel=0, const char *file=NULL, bool buffer=false)
Run-Time Initialization.
static void reset()
Reset logging.
~LoggerManager()
Destructor.
static void logDuplicatedMessages()
List duplicated log messages.
static void readLocalMessageFile(const char *file)
Read local message file.
LoggerManager()
Constructor.
Formatter error(const MessageID &ident)
Output Error Message.
Formatter info(const MessageID &ident)
Output Informational Message.
Formatter warn(const MessageID &ident)
Output Warning Message.
void setInterprocessSync(isc::log::interprocess::InterprocessSync *sync)
Replace the interprocess synchronization object.
static const MessageDictionaryPtr & globalDictionary()
Return Global Dictionary.
std::vector< std::string > arguments() const
Return Arguments.
MessageID id() const
Return Message ID.
static void loadDictionary(bool ignore_duplicates=false)
Run-Time Initialization.
static const std::list< std::string > & getDuplicates()
Return Duplicates.
static void clearDuplicates()
Clear the static duplicates list.
std::vector< std::string > MessageIDCollection
Visible collection types.
MessageIDCollection getNotAdded() const
Get Not-Added List.
virtual void readFile(const std::string &file, Mode mode=ADD)
Read File.
Null Interprocess Sync Class.
Mutex with very simple interface.
Logging initialization functions.
#define LOG_WARN(LOGGER, MESSAGE)
Macro to conveniently test warn output and log it.
isc::log::Logger logger("asiodns")
Use the ASIO logger.
void setLoggingInitialized(bool state)
Set state of "logging initialized" flag.
const isc::log::MessageID LOG_NO_SUCH_MESSAGE
const isc::log::MessageID LOG_DUPLICATE_MESSAGE_ID
void setRootLoggerName(const std::string &name)
Set root logger name.
const isc::log::MessageID LOG_READING_LOCAL_FILE
const std::string & getDefaultRootLoggerName()
Returns the default ('kea') root logger name.
boost::shared_ptr< MessageDictionary > MessageDictionaryPtr
Shared pointer to the MessageDictionary.
Defines the logger used by the top-level component of kea-dhcp-ddns.