File: customloglevel.h

package info (click to toggle)
log4cplus 2.0.5-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 10,560 kB
  • sloc: cpp: 46,669; sh: 10,310; ansic: 1,845; python: 1,114; perl: 258; makefile: 214; xml: 85; objc: 59
file content (16 lines) | stat: -rw-r--r-- 499 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <log4cplus/logger.h>
#include <log4cplus/helpers/loglog.h>

using namespace log4cplus;
using namespace log4cplus::helpers;

const LogLevel CRITICAL_LOG_LEVEL = 45000;

#define LOG4CPLUS_CRITICAL(logger, logEvent) \
    if(logger.isEnabledFor(CRITICAL_LOG_LEVEL)) { \
        log4cplus::tostringstream _log4cplus_buf; \
        _log4cplus_buf << logEvent; \
        logger.forcedLog(CRITICAL_LOG_LEVEL, _log4cplus_buf.str(), __FILE__, __LINE__); \
    }

void initializeCriticalLogLevel ();