Defines the minimum set of levels recognized by the system, that is OFF
, FATAL
, ERROR
, WARN
, INFO
, DEBUG
and ALL
.
More...
Inherits ObjectImpl.
|
unsigned int volatile | ref |
|
Defines the minimum set of levels recognized by the system, that is OFF
, FATAL
, ERROR
, WARN
, INFO
, DEBUG
and ALL
.
The Level
class may be subclassed to define a larger level set.
- Enumerator:
OFF_INT |
|
FATAL_INT |
|
ERROR_INT |
|
WARN_INT |
|
INFO_INT |
|
DEBUG_INT |
|
TRACE_INT |
|
ALL_INT |
|
Instantiate a Level object.
virtual bool equals |
( |
const LevelPtr & |
level | ) |
const |
|
virtual |
Two levels are equal if their level fields are equal.
int getSyslogEquivalent |
( |
| ) |
const |
|
inline |
Return the syslog equivalent of this level as an integer.
virtual bool isGreaterOrEqual |
( |
const LevelPtr & |
level | ) |
const |
|
virtual |
Returns true
if this level has a higher or equal level than the level passed as argument, false
otherwise.
You should think twice before overriding the default implementation of isGreaterOrEqual
method.
bool operator!= |
( |
const Level & |
level1 | ) |
const |
|
inline |
bool operator== |
( |
const Level & |
level1 | ) |
const |
|
inline |
Returns the integer representation of this level.
static LevelPtr toLevel |
( |
const std::string & |
sArg | ) |
|
|
static |
Convert the string passed as argument to a level.
If the conversion fails, then this method returns DEBUG.
- Parameters
-
static LevelPtr toLevel |
( |
const std::string & |
sArg, |
|
|
const LevelPtr & |
defaultLevel |
|
) |
| |
|
static |
Convert the string passed as argument to a level.
If the conversion fails, then this method returns the value of defaultLevel
.
- Parameters
-
sArg | level name. |
defaultLevel | level to return if no match. |
- Returns
static LevelPtr toLevel |
( |
const std::wstring & |
sArg | ) |
|
|
static |
Convert the string passed as argument to a level.
If the conversion fails, then this method returns DEBUG.
- Parameters
-
static LevelPtr toLevel |
( |
const std::wstring & |
sArg, |
|
|
const LevelPtr & |
defaultLevel |
|
) |
| |
|
static |
Convert the string passed as argument to a level.
If the conversion fails, then this method returns the value of defaultLevel
.
- Parameters
-
sArg | level name. |
defaultLevel | level to return if no match. |
- Returns
Convert the string passed as argument to a level.
If the conversion fails, then this method returns DEBUG.
- Parameters
-
Convert the string passed as argument to a level.
If the conversion fails, then this method returns the value of defaultLevel
.
- Parameters
-
sArg | level name. |
defaultLevel | level to return if no match. |
- Returns
Convert the string passed as argument to a level.
If the conversion fails, then this method returns DEBUG.
- Parameters
-
Convert the string passed as argument to a level.
If the conversion fails, then this method returns the value of defaultLevel
.
- Parameters
-
sArg | level name. |
defaultLevel | level to return if no match. |
- Returns
Convert an integer passed as argument to a level.
If the conversion fails, then this method returns DEBUG.
Convert an integer passed as argument to a level.
If the conversion fails, then this method returns the specified default.
Convert the string passed as argument to a level.
If the conversion fails, then this method returns DEBUG.
- Parameters
-
Convert the string passed as argument to a level.
If the conversion fails, then this method returns the value of defaultLevel
.
- Parameters
-
sArg | level name. |
defaultLevel | level to return if no match. |
- Returns
void toString |
( |
std::string & |
name | ) |
const |
Get the name of the level in the current encoding.
- Parameters
-
name | buffer to which name is appended. |
void toString |
( |
std::wstring & |
name | ) |
const |
Get the name of the level.
- Parameters
-
name | buffer to which name is appended. |
void toString |
( |
std::basic_string< UniChar > & |
name | ) |
const |
Get the name of the level.
- Parameters
-
name | buffer to which name is appended. |
Get the name of the level.
- Parameters
-
name | buffer to which name is appended. |
Returns the string representation of this level.
- Returns
- level name.
The documentation for this class was generated from the following file: