This is the base class for logger levels.
More...
#include <QC_LoggerLevel.dox.h>
Inherits Serializable.
|
| constructor (int code, string level) |
| Creates the level with the supplied arguments.
|
|
string | getStr () |
| Gets the level string.
|
|
int | getValue () |
| Gets the level code value.
|
|
bool | isEqual (LoggerLevel other) |
| Compares two logger levels.
|
|
bool | isGreaterOrEqual (LoggerLevel other) |
| Compares logger levels.
|
|
This is the base class for logger levels.
This class stores the integer and string log level values
◆ constructor()
Qore::Logger::LoggerLevel::constructor |
( |
int |
code, |
|
|
string |
level |
|
) |
| |
Creates the level with the supplied arguments.
- Parameters
-
code | integer log level value |
level | string log level value |
◆ getLevel() [1/2]
Converts the input argument to a level.
Return value is either instantiated or used the existing one if there is any.
- Parameters
-
level | the input level |
default_level | value to return if conversion is not possible. |
- Exceptions
-
LOGGER-ERROR | if defaultLevel is nothing and level not found |
◆ getLevel() [2/2]
Converts the input argument to a level.
Return value is either instantiated or used the existing one if there is any.
- Parameters
-
level_str | the string input level |
default_level | value to return if conversion is not possible. |
- Exceptions
-
LOGGER-ERROR | if default_level is nothing and level_str not found |
◆ getNextHigherLevel()
static *LoggerLevel Qore::Logger::LoggerLevel::getNextHigherLevel |
( |
int |
level | ) |
|
|
static |
Returns closest higher logger level.
- Parameters
-
- Returns
Loggerlevel
or NOTHING
if there is no higher level
- Exceptions
-
LOGGER-ERROR | if level not found |
◆ getNextLowerLevel()
static *LoggerLevel Qore::Logger::LoggerLevel::getNextLowerLevel |
( |
int |
level | ) |
|
|
static |
Returns closest lower logger level.
- Parameters
-
- Returns
Loggerlevel
or NOTHING
if there is no lower level
- Exceptions
-
LOGGER-ERROR | if level not found |
◆ isEqual()
bool Qore::Logger::LoggerLevel::isEqual |
( |
LoggerLevel |
other | ) |
|
Compares two logger levels.
- Parameters
-
other | the other level to compares |
◆ isGreaterOrEqual()
bool Qore::Logger::LoggerLevel::isGreaterOrEqual |
( |
LoggerLevel |
other | ) |
|
Compares logger levels.
- Parameters
-
other | the other level to compares |
- Returns
- True if level is greater or equal to the other level
The documentation for this class was generated from the following file: