log4cpp
1.1.6
Toggle main menu visibility
Loading...
Searching...
No Matches
Priority.hh
Go to the documentation of this file.
1
/*
2
* Priority.hh
3
*
4
* Copyright 2000, LifeLine Networks BV (www.lifeline.nl). All rights reserved.
5
* Copyright 2000, Bastiaan Bakker. All rights reserved.
6
*
7
* See the COPYING file for the terms of usage and distribution.
8
*/
9
10
#ifndef _LOG4CPP_PRIORITY_HH
11
#define _LOG4CPP_PRIORITY_HH
12
13
#include <
log4cpp/Portability.hh
>
14
#include <stdexcept>
15
#include <string>
16
17
/*
18
* Optionally work around rudeness in windows.h on Win32.
19
*/
20
#ifdef ERROR
21
#ifdef LOG4CPP_FIX_ERROR_COLLISION
22
23
namespace
log4cpp
{
24
static
const
int
_tmpERRORValue = ERROR;
25
}
26
27
#undef ERROR
28
static
const
int
ERROR = log4cpp::_tmpERRORValue;
29
#define ERROR ERROR
30
31
#else
// LOG4CPP_FIX_ERROR_COLLISION
32
#error Naming collision for 'ERROR' detected. Please read the FAQ for a \
33
workaround.
34
#endif
// LOG4CPP_FIX_ERROR_COLLISION
35
36
#endif
// ERROR
37
38
/*
39
* Other Win32 rudeness in EDK.h
40
*/
41
#ifdef DEBUG
42
43
#ifdef LOG4CPP_FIX_ERROR_COLLISION
44
45
#undef DEBUG
46
#define DEBUG DEBUG
47
48
#else
// LOG4CPP_FIX_ERROR_COLLISION
49
#error Naming collision for 'DEBUG' detected. Please read the FAQ for a \
50
workaround.
51
#endif
// LOG4CPP_FIX_ERROR_COLLISION
52
53
#endif
// DEBUG
54
55
namespace
log4cpp
{
56
61
class
LOG4CPP_EXPORT
Priority
{
62
public
:
63
static
const
int
MESSAGE_SIZE
;
// = 8;
64
69
typedef
enum
{
70
EMERG
= 0,
71
FATAL
= 0,
72
ALERT
= 100,
73
CRIT
= 200,
74
ERROR
= 300,
75
WARN
= 400,
76
NOTICE
= 500,
77
INFO
= 600,
78
DEBUG
= 700,
79
NOTSET
= 800
80
} PriorityLevel;
81
85
typedef
int
Value
;
86
95
static
const
std::string&
getPriorityName
(
int
priority)
LOG4CPP_NOTHROW
;
96
106
static
Value
getPriorityValue
(
const
std::string& priorityName);
107
};
108
}
// namespace log4cpp
109
110
#endif
// _LOG4CPP_PRIORITY_HH
LOG4CPP_EXPORT
#define LOG4CPP_EXPORT
Definition
Export.hh:26
Portability.hh
LOG4CPP_NOTHROW
#define LOG4CPP_NOTHROW
Definition
Portability.hh:82
log4cpp::Priority
The Priority class provides importance levels with which one can categorize log messages.
Definition
Priority.hh:61
log4cpp::Priority::Value
int Value
The type of Priority Values.
Definition
Priority.hh:85
log4cpp::Priority::getPriorityName
static const std::string & getPriorityName(int priority) LOG4CPP_NOTHROW
Returns the name of the given priority value.
Definition
Priority.cpp:26
log4cpp::Priority::getPriorityValue
static Value getPriorityValue(const std::string &priorityName)
Returns the value of the given priority name.
Definition
Priority.cpp:33
log4cpp::Priority::MESSAGE_SIZE
static const int MESSAGE_SIZE
Definition
Priority.hh:63
log4cpp::Priority::FATAL
@ FATAL
Definition
Priority.hh:71
log4cpp::Priority::CRIT
@ CRIT
Definition
Priority.hh:73
log4cpp::Priority::DEBUG
@ DEBUG
Definition
Priority.hh:78
log4cpp::Priority::EMERG
@ EMERG
Definition
Priority.hh:70
log4cpp::Priority::INFO
@ INFO
Definition
Priority.hh:77
log4cpp::Priority::ALERT
@ ALERT
Definition
Priority.hh:72
log4cpp::Priority::WARN
@ WARN
Definition
Priority.hh:75
log4cpp::Priority::ERROR
@ ERROR
Definition
Priority.hh:74
log4cpp::Priority::NOTICE
@ NOTICE
Definition
Priority.hh:76
log4cpp::Priority::NOTSET
@ NOTSET
Definition
Priority.hh:79
log4cpp
The top level namespace for all 'Log for C++' types and classes.
Definition
AbortAppender.hh:16
include
log4cpp
Priority.hh
Generated by
1.17.0