How can I check whether or not log4cplus has been configured?
That is, if I run a class which has some LOG4CPLUS_DEBUG(logger,...)
code, how can I check if the configuration has been previously run or not so as to avoid:
log4cplus:ERROR No appenders could be found for logger ([loggername]). log4cplus:ERROR Please initialize the log4cplus system properly.
Thanks.
There is no specific check that any configuration has been done. But you can ask if certain logger does or does not exist. See
log4cplus::Logger::exists()
.Diff:
Ticket moved from /p/log4cplus/support-requests/38/