1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
#include "customloglevel.h"
static log4cplus::tstring const CRITICAL_STRING (LOG4CPLUS_TEXT("CRITICAL"));
static log4cplus::tstring const empty_str;
static
tstring const &
criticalToStringMethod(LogLevel ll)
{
if(ll == CRITICAL_LOG_LEVEL) {
return CRITICAL_STRING;
}
else {
return empty_str;
}
}
static
LogLevel
criticalFromStringMethod(const tstring& s)
{
if(s == CRITICAL_STRING) return CRITICAL_LOG_LEVEL;
return NOT_SET_LOG_LEVEL;
}
void initializeCriticalLogLevel ()
{
getLogLevelManager().pushToStringMethod(criticalToStringMethod);
getLogLevelManager().pushFromStringMethod(criticalFromStringMethod);
}
|