Loading...
Searching...
No Matches
Priority.hh
Go to the documentation of this file.
/*
* Priority.hh
*
* Copyright 2000, LifeLine Networks BV (www.lifeline.nl). All rights reserved.
* Copyright 2000, Bastiaan Bakker. All rights reserved.
*
* See the COPYING file for the terms of usage and distribution.
*/
#ifndef _LOG4SHIB_PRIORITY_HH
#define _LOG4SHIB_PRIORITY_HH
#include <log4shib/Portability.hh>
#include <string>
#include <stdexcept>
/*
* Optionally work around rudeness in windows.h on Win32.
*/
#ifdef ERROR
#ifdef LOG4SHIB_FIX_ERROR_COLLISION
namespace log4shib {
static const int _tmpERRORValue = ERROR;
}
#undef ERROR
static const int ERROR = log4shib::_tmpERRORValue;
#define ERROR ERROR
#else // LOG4SHIB_FIX_ERROR_COLLISION
#error Naming collision for 'ERROR' detected. Please read the FAQ for a \
workaround.
#endif // LOG4SHIB_FIX_ERROR_COLLISION
#endif // ERROR
/*
* Other Win32 rudeness in EDK.h
*/
#ifdef DEBUG
#ifdef LOG4SHIB_FIX_ERROR_COLLISION
#undef DEBUG
#define DEBUG DEBUG
#else // LOG4SHIB_FIX_ERROR_COLLISION
#error Naming collision for 'DEBUG' detected. Please read the FAQ for a \
workaround.
#endif // LOG4SHIB_FIX_ERROR_COLLISION
#endif // DEBUG
namespace log4shib {
class LOG4SHIB_EXPORT Priority {
public:
typedef enum {EMERG = 0,
FATAL = 0,
ALERT = 100,
CRIT = 200,
ERROR = 300,
WARN = 400,
NOTICE = 500,
INFO = 600,
DEBUG = 700,
NOTSET = 800
} PriorityLevel;
typedef int Value;
static const std::string& getPriorityName(int priority) throw();
static Value getPriorityValue(const std::string& priorityName);
};
}
#endif // _LOG4SHIB_PRIORITY_HH
LOG4SHIB_EXPORT
#define LOG4SHIB_EXPORT
Definition Export.hh:11
Portability.hh
log4shib::Priority
The Priority class provides importance levels with which one can categorize log messages.
Definition Priority.hh:62
log4shib::Priority::EMERG
@ EMERG
Definition Priority.hh:69
log4shib::Priority::WARN
@ WARN
Definition Priority.hh:74
log4shib::Priority::NOTSET
@ NOTSET
Definition Priority.hh:78
log4shib::Priority::ERROR
@ ERROR
Definition Priority.hh:73
log4shib::Priority::FATAL
@ FATAL
Definition Priority.hh:70
log4shib::Priority::ALERT
@ ALERT
Definition Priority.hh:71
log4shib::Priority::DEBUG
@ DEBUG
Definition Priority.hh:77
log4shib::Priority::CRIT
@ CRIT
Definition Priority.hh:72
log4shib::Priority::NOTICE
@ NOTICE
Definition Priority.hh:75
log4shib::Priority::INFO
@ INFO
Definition Priority.hh:76
log4shib::Priority::Value
int Value
The type of Priority Values.
Definition Priority.hh:84
log4shib::Priority::getPriorityName
static const std::string & getPriorityName(int priority)
Returns the name of the given priority value.
Definition Priority.cpp:23
log4shib::Priority::getPriorityValue
static Value getPriorityValue(const std::string &priorityName)
Returns the value of the given priority name.
Definition Priority.cpp:30
log4shib
The top level namespace for all 'Log for C++' types and classes.
Definition AbortAppender.hh:16