25Logger::getLoggerPtr() {
27 lock_guard<mutex> lk(mutex_);
38Logger::initLoggerImpl() {
40 loggerptr_ =
new LoggerImpl(name_);
42 isc_throw(LoggingNotInitialized,
"attempt to access logging function "
43 "before logging has been initialized");
68 return (getLoggerPtr()->
getName());
144Logger::output(
const Severity& severity,
const std::string& message) {
145 getLoggerPtr()->
outputRaw(severity, message);
161 return (
Formatter(
INFO, getLoggerPtr()->lookupMessage(ident),
171 return (
Formatter(
WARN, getLoggerPtr()->lookupMessage(ident),
214 return (*getLoggerPtr() == *other.getLoggerPtr());
void outputRaw(const Severity &severity, const std::string &message)
Raw output.
virtual void setSeverity(Severity severity, int dbglevel=1)
Set Severity Level for Logger.
void setInterprocessSync(isc::log::interprocess::InterprocessSync *sync)
Replace the interprocess synchronization object.
bool hasAppender(OutputOption::Destination const destination)
Check if this logger has an appender of the given type.
static std::string getVersion()
Version.
Formatter error(const MessageID &ident)
Output Error Message.
Formatter info(const MessageID &ident)
Output Informational Message.
Formatter warn(const MessageID &ident)
Output Warning Message.
virtual void setSeverity(isc::log::Severity severity, int dbglevel=1)
Set Severity Level for Logger.
isc::log::Formatter< Logger > Formatter
The formatter used to replace placeholders.
void setInterprocessSync(isc::log::interprocess::InterprocessSync *sync)
Replace the interprocess synchronization object.
Formatter debug(int dbglevel, const MessageID &ident)
Output Debug Message.
virtual int getEffectiveDebugLevel()
Get Effective Debug Level for Logger.
virtual isc::log::Severity getEffectiveSeverity()
Get Effective Severity Level for Logger.
virtual ~Logger()
Destructor.
virtual isc::log::Severity getSeverity()
Get Severity Level for Logger.
virtual bool isWarnEnabled()
Is WARNING Enabled?
virtual bool isFatalEnabled()
Is FATAL Enabled?
Formatter fatal(const MessageID &ident)
Output Fatal Message.
virtual bool isDebugEnabled(int dbglevel=MIN_DEBUG_LEVEL)
Returns if Debug Message Should Be Output.
virtual bool isInfoEnabled()
Is INFO Enabled?
bool operator==(Logger &other)
Equality.
virtual std::string getName()
Get Name of Logger.
virtual bool isErrorEnabled()
Is ERROR Enabled?
static std::string getVersion()
Version.
virtual int getDebugLevel()
Return DEBUG Level.
bool hasAppender(OutputOption::Destination const destination)
Check if this logger has an appender of the given type.
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
Logging initialization functions.
bool isLoggingInitialized()
Is logging initialized?
Defines the logger used by the top-level component of kea-lfc.