24 namespace interprocess {
163 Logger(
const char* name) : loggerptr_(0), initialized_(false) {
168 size_t namelen = std::strlen(name);
169 if ((namelen == 0) || (namelen > MAX_LOGGER_NAME_SIZE)) {
171 <<
"name for a logger: valid names must be between 1 "
172 <<
"and " << MAX_LOGGER_NAME_SIZE <<
" characters in "
180 std::strncpy(name_, name, MAX_LOGGER_NAME_SIZE);
313 void output(
const Severity& severity,
const std::string& message);
342 void initLoggerImpl();
348 char name_[MAX_LOGGER_NAME_SIZE + 1];
354 std::atomic<bool> initialized_;
Logger(const char *name)
Constructor.
virtual bool isWarnEnabled()
Is WARNING Enabled?
virtual bool isErrorEnabled()
Is ERROR Enabled?
virtual bool isInfoEnabled()
Is INFO Enabled?
Formatter fatal(const MessageID &ident)
Output Fatal Message.
virtual isc::log::Severity getSeverity()
Get Severity Level for Logger.
virtual ~Logger()
Destructor.
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
Formatter debug(int dbglevel, const MessageID &ident)
Output Debug Message.
const int MIN_DEBUG_LEVEL
Minimum/maximum debug levels.
Console Logger Implementation.
virtual bool isFatalEnabled()
Is FATAL Enabled?
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
virtual bool isDebugEnabled(int dbglevel=MIN_DEBUG_LEVEL)
Returns if Debug Message Should Be Output.
LoggingNotInitialized(const char *file, size_t line, const char *what)
This is a base class for exceptions thrown from the DNS library module.
Defines the logger used by the top-level component of kea-dhcp-ddns.
static const size_t MAX_LOGGER_NAME_SIZE
Maximum size of a logger name.
virtual int getDebugLevel()
Return DEBUG Level.
virtual int getEffectiveDebugLevel()
Get Effective Debug Level for Logger.
Formatter error(const MessageID &ident)
Output Error Message.
BadInterprocessSync(const char *file, size_t line, const char *what)
Formatter warn(const MessageID &ident)
Output Warning Message.
virtual void setSeverity(isc::log::Severity severity, int dbglevel=1)
Set Severity Level for Logger.
static std::string getVersion()
Version.
LoggerNameError(const char *file, size_t line, const char *what)
isc::log::Formatter< Logger > Formatter
The formatter used to replace placeholders.
virtual std::string getName()
Get Name of Logger.
virtual isc::log::Severity getEffectiveSeverity()
Get Effective Severity Level for Logger.
Formatter info(const MessageID &ident)
Output Informational Message.
void setInterprocessSync(isc::log::interprocess::InterprocessSync *sync)
Replace the interprocess synchronization object.
bool operator==(Logger &other)
Equality.