Defines the minimum set of levels recognized by the system, that is OFF
, FATAL
, ERROR
, WARN
, INFO
, DEBUG
and ALL
.
More...
#include <level.h>
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.
◆ anonymous enum
Enumerator |
---|
OFF_INT | |
FATAL_INT | |
ERROR_INT | |
WARN_INT | |
INFO_INT | |
DEBUG_INT | |
TRACE_INT | |
ALL_INT | |
◆ Level()
Instantiate a Level object.
◆ equals()
virtual bool equals |
( |
const LevelPtr & | level | ) |
const |
|
virtual |
Two levels are equal if their level fields are equal.
◆ getAll()
◆ getDebug()
◆ getError()
◆ getFatal()
◆ getInfo()
◆ getOff()
◆ getSyslogEquivalent()
int getSyslogEquivalent |
( |
| ) |
const |
|
inline |
Return the syslog equivalent of this level as an integer.
◆ getTrace()
◆ getWarn()
◆ isGreaterOrEqual()
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.
◆ operator!=()
bool operator!= |
( |
const Level & | level1 | ) |
const |
|
inline |
◆ operator==()
bool operator== |
( |
const Level & | level1 | ) |
const |
|
inline |
◆ toInt()
Returns the integer representation of this level.
◆ toLevel() [1/10]
Convert the string passed as argument to a level.
If the conversion fails, then this method returns DEBUG.
- Parameters
-
◆ toLevel() [2/10]
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
◆ toLevel() [3/10]
Convert the string passed as argument to a level.
If the conversion fails, then this method returns DEBUG.
- Parameters
-
◆ toLevel() [4/10]
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
◆ toLevel() [5/10]
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
-
◆ toLevel() [6/10]
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
◆ toLevel() [7/10]
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
-
◆ toLevel() [8/10]
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
◆ toLevel() [9/10]
Convert an integer passed as argument to a level.
If the conversion fails, then this method returns DEBUG.
◆ toLevel() [10/10]
Convert an integer passed as argument to a level.
If the conversion fails, then this method returns the specified default.
◆ toLevelLS() [1/2]
Convert the string passed as argument to a level.
If the conversion fails, then this method returns DEBUG.
- Parameters
-
◆ toLevelLS() [2/2]
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
◆ toString() [1/5]
Returns the string representation of this level.
- Returns
- level name.
◆ toString() [2/5]
Get the name of the level.
- Parameters
-
name | buffer to which name is appended. |
◆ toString() [3/5]
void toString |
( |
std::basic_string< UniChar > & | name | ) |
const |
Get the name of the level.
- Parameters
-
name | buffer to which name is appended. |
◆ toString() [4/5]
void toString |
( |
std::string & | name | ) |
const |
Get the name of the level in the current encoding.
- Parameters
-
name | buffer to which name is appended. |
◆ toString() [5/5]
void toString |
( |
std::wstring & | name | ) |
const |
Get the name of the level.
- Parameters
-
name | buffer to which name is appended. |
The documentation for this class was generated from the following file: