 |
log4cplus
2.0.6
|
Go to the documentation of this file.
38 #ifndef LOG4CPLUS_INTERNAL_CUSTOMLOGLEVELMANAGER_HEADER_
39 #define LOG4CPLUS_INTERNAL_CUSTOMLOGLEVELMANAGER_HEADER_
43 #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE)
47 #if ! defined (INSIDE_LOG4CPLUS)
48 # error "This header must not be be used outside log4cplus' implementation files."
68 std::map<LogLevel,tstring>
ll2nm;
69 std::map<tstring,LogLevel>
nm2ll;
87 auto i =
ll2nm.lower_bound(ll);
88 if( ( i !=
ll2nm.end() ) && ( i->first == ll ) && ( i->second != nm ) )
91 auto j =
nm2ll.lower_bound(nm);
92 if( ( j !=
nm2ll.end() ) && ( j->first == nm ) && ( j->second != ll ) )
96 ll2nm.insert( i, std::make_pair(ll, nm) );
97 nm2ll.insert( j, std::make_pair(nm, ll) );
105 auto i =
ll2nm.find(ll);
106 auto j =
nm2ll.find(nm);
107 if( ( i !=
ll2nm.end() ) && ( j !=
nm2ll.end() ) &&
108 ( i->first == j->second ) && ( i->second == j->first ) ) {
123 auto i =
ll2nm.find(ll);
124 if( i !=
ll2nm.end() )
133 auto i =
nm2ll.find(nm);
134 if( i !=
nm2ll.end() )
151 #endif // LOG4CPLUS_INTERNAL_CUSTOMLOGLEVELMANAGER_HEADER
std::basic_string< tchar > tstring
bool remove(LogLevel ll, tstring const &nm)
bool add(LogLevel ll, tstring const &nm)
const tstring & customToStringMethodWorker(LogLevel ll)
static LOG4CPLUS_PRIVATE const tstring & customToStringMethod(LogLevel ll)
const log4cplus::tstring empty_str
Canonical empty string.
static LOG4CPLUS_PRIVATE LogLevel customFromStringMethod(const tstring &nm)
LOG4CPLUS_PRIVATE CustomLogLevelManager & getCustomLogLevelManager()
const LogLevel NOT_SET_LOG_LEVEL
void pushFromStringMethod(StringToLogLevelMethod newFromString)
When creating a "derived" LogLevel, a StringToLogLevelMethod should be defined and registered with th...
std::map< LogLevel, tstring > ll2nm
Custom log level manager used by C API.
LogLevel customFromStringMethodWorker(const tstring &nm)
log4cplus::thread::Mutex mtx
#define LOG4CPLUS_PRIVATE
LOG4CPLUS_EXPORT LogLevelManager & getLogLevelManager()
Returns the singleton LogLevelManager.
void pushToStringMethod(LogLevelToStringMethod newToString)
When creating a "derived" LogLevel, a LogLevelToStringMethod should be defined and registered with th...
std::map< tstring, LogLevel > nm2ll