19 bool logging_init_state =
false;
29 return (logging_init_state);
37 logging_init_state = state;
44 const char* file,
bool buffer) {
45 LoggerManager::init(root, severity, dbglevel, file, buffer);
58 const string DEVNULL =
"/dev/null";
59 const string STDOUT =
"stdout";
60 const string STDERR =
"stderr";
61 const string SYSLOG =
"syslog";
62 const string SYSLOG_COLON =
"syslog:";
68 const char* destination = getenv(
"KEA_LOGGER_DESTINATION");
69 const string dest((destination == NULL) ? DEVNULL : destination);
81 option.
stream = OutputOption::STR_STDOUT;
83 }
else if (dest == STDERR) {
85 option.
stream = OutputOption::STR_STDERR;
87 }
else if (dest == SYSLOG) {
92 }
else if (dest.find(SYSLOG_COLON) == 0) {
95 if (dest == SYSLOG_COLON) {
96 cerr <<
"**ERROR** value for KEA_LOGGER_DESTINATION of " <<
97 SYSLOG_COLON <<
" is invalid, " << SYSLOG <<
98 " will be used instead\n";
103 option.
facility = dest.substr(SYSLOG_COLON.size());