32#ifdef LOG4CPLUS_INITIALIZER_H
33#include <log4cplus/initializer.h>
35log4cplus::Initializer initializer;
52int& initDebugLevel() {
53 static int dbglevel = 0;
57std::string& initRootName() {
80LoggerManager::processInit() {
86LoggerManager::processSpecification(
const LoggerSpecification& spec) {
92LoggerManager::processEnd() {
101 int dbglevel,
const char* file,
bool buffer)
110 initRootName() = root;
111 initSeverity() = severity;
112 initDebugLevel() = dbglevel;
142 if (!duplicates.empty()) {
147 for (
auto const& i : duplicates) {
181 for (MessageReader::MessageIDCollection::const_iterator
182 i = unknown.begin(); i != unknown.end(); ++i) {
183 string message_id = boost::lexical_cast<string>(*i);
194 for (vector<string>::size_type i = 0; i < args.size(); ++i) {
195 error_message = error_message.
arg(args[i]);
209 static std::mutex mutex;
Logger Manager Implementation.
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 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 std::mutex & getMutex()
Return a process-global mutex that's used for mutual exclusion among threads of a single process duri...
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.
MessageIDCollection getNotAdded() const
Get Not-Added List.
std::vector< std::string > MessageIDCollection
Visible collection types.
virtual void readFile(const std::string &file, Mode mode=ADD)
Read File.
Null Interprocess Sync Class.
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-lfc.