27 Logger::getLoggerPtr() {
29 lock_guard<mutex> lk(mutex_);
40 Logger::initLoggerImpl() {
42 loggerptr_ =
new LoggerImpl(
name_);
44 isc_throw(LoggingNotInitialized,
"attempt to access logging function "
45 "before logging has been initialized");
62 Logger::getVersion() {
63 return (LoggerImpl::getVersion());
70 return (getLoggerPtr()->getName());
77 getLoggerPtr()->setSeverity(severity, dbglevel);
90 Logger::getEffectiveSeverity() {
91 return (getLoggerPtr()->getEffectiveSeverity());
97 Logger::getDebugLevel() {
98 return (getLoggerPtr()->getDebugLevel());
105 Logger::getEffectiveDebugLevel() {
106 return (getLoggerPtr()->getEffectiveDebugLevel());
112 Logger::isDebugEnabled(
int dbglevel) {
113 return (getLoggerPtr()->isDebugEnabled(dbglevel));
117 Logger::isInfoEnabled() {
118 return (getLoggerPtr()->isInfoEnabled());
122 Logger::isWarnEnabled() {
123 return (getLoggerPtr()->isWarnEnabled());
127 Logger::isErrorEnabled() {
128 return (getLoggerPtr()->isErrorEnabled());
132 Logger::isFatalEnabled() {
133 return (getLoggerPtr()->isFatalEnabled());
146 Logger::output(
const Severity& severity,
const std::string& message) {
147 getLoggerPtr()->outputRaw(severity, message);
152 if (isDebugEnabled(dbglevel)) {
162 if (isInfoEnabled()) {
163 return (
Formatter(
INFO, getLoggerPtr()->lookupMessage(ident),
172 if (isWarnEnabled()) {
173 return (
Formatter(
WARN, getLoggerPtr()->lookupMessage(ident),
182 if (isErrorEnabled()) {
192 if (isFatalEnabled()) {
204 getLoggerPtr()->setInterprocessSync(sync);
211 return (*getLoggerPtr() == *other.getLoggerPtr());
isc::log::Severity getSeverity(const std::string &sev_str)
Returns the isc::log::Severity value represented by the given string.
bool operator==(const Element &a, const Element &b)
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
bool isLoggingInitialized()
Is logging initialized?
Defines the logger used by the top-level component of kea-dhcp-ddns.
Logging initialization functions.