25 namespace interprocess {
145 static const size_t MAX_LOGGER_NAME_SIZE = 31;
164 Logger(
const char* name) : loggerptr_(0), initialized_(false) {
169 size_t namelen = std::strlen(name);
170 if ((namelen == 0) || (namelen > MAX_LOGGER_NAME_SIZE)) {
172 <<
"name for a logger: valid names must be between 1 " 173 <<
"and " << MAX_LOGGER_NAME_SIZE <<
" characters in " 181 std::strncpy(
name_, name, MAX_LOGGER_NAME_SIZE);
182 name_[MAX_LOGGER_NAME_SIZE] =
'\0';
189 static std::string getVersion();
197 virtual std::string getName();
227 virtual int getDebugLevel();
234 virtual int getEffectiveDebugLevel();
244 virtual bool isInfoEnabled();
247 virtual bool isWarnEnabled();
250 virtual bool isErrorEnabled();
253 virtual bool isFatalEnabled();
321 void output(
const Severity& severity,
const std::string& message);
350 void initLoggerImpl();
356 char name_[MAX_LOGGER_NAME_SIZE + 1];
362 std::atomic<bool> initialized_;
Logger(const char *name)
Constructor.
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.
const int MIN_DEBUG_LEVEL
Minimum/maximum debug levels.
Console Logger Implementation.
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-lfc.
BadInterprocessSync(const char *file, size_t line, const char *what)
LoggerNameError(const char *file, size_t line, const char *what)
isc::log::Formatter< Logger > Formatter
The formatter used to replace placeholders.