Qore Logger Module Reference
0.2
|
Defines the minimum set of levels recognized by the system. More...
Inherits Serializable.
Public Member Methods | |
constructor (int code, string str) | |
Creates a new object. More... | |
string | getStr () |
Gets level string. | |
int | getValue () |
Gets level code value. | |
bool | isEqual (LoggerLevel other) |
Compares two logger levels. More... | |
bool | isGreaterOrEqual (LoggerLevel other) |
Compares logger levels. More... | |
Static Public Member Methods | |
static LoggerLevel | getLevel (int level, *LoggerLevel default_level) |
Converts the input argument to a level. More... | |
static LoggerLevel | getLevel (string level_str, *LoggerLevel default_level) |
Converts the input argument to a level. More... | |
static LoggerLevel | getLevelAll () |
Returns an ALL Level. | |
static LoggerLevel | getLevelDebug () |
Returns a DEBUG Level. | |
static LoggerLevel | getLevelError () |
Returns an ERROR Level. | |
static LoggerLevel | getLevelFatal () |
Returns a FATAL Level. | |
static LoggerLevel | getLevelInfo () |
Returns an INFO Level. | |
static LoggerLevel | getLevelOff () |
Returns an OFF Level. | |
static LoggerLevel | getLevelTrace () |
Returns a TRACE Level. | |
static LoggerLevel | getLevelWarn () |
Returns a WARN Level. | |
static *LoggerLevel | getNextHigherLevel (int level) |
Returns closest higher logger level. More... | |
static *LoggerLevel | getNextLowerLevel (int level) |
Returns closest lower logger level. More... | |
Public Attributes | |
const | ALL = MININT |
The lowest logger level. | |
const | DEBUG = 10000 |
Logger level for debugging messages. | |
const | ERROR = 40000 |
Logger level for (non-fatal) errors. | |
const | FATAL = 50000 |
Logger level for fatal errors. | |
const | INFO = 20000 |
Logger level for informational messages. | |
const | OFF = MAXINT |
The highest logger level. | |
const | TRACE = 5000 |
Logger level for trace messages. | |
const | WARN = 30000 |
Logger level for warnings. | |
Private:Internal Attributes | |
const | LEVEL_TO_LEVEL_STR = map {$1.value: $1.key} |
Int to string hash. | |
int | levelCode |
Integer level value. | |
string | levelStr |
String representation of the level. | |
const | LEVELSTR_TO_LEVEL = ... |
String to int hash. | |
Static Private:Internal Attributes | |
static hash< string, LoggerLevel > | levelMap |
Contains a list of instantiated levels. | |
Defines the minimum set of levels recognized by the system.
The set of built-in levels includes TRACE
, DEBUG
, INFO
, WARN
, ERROR
and FATAL
. Log4q also supports custom log levels where the LoggerLevel
class may be subclassed to define a larger level set.
Creates a new object.
code | integer value |
str | string representation |
|
static |
Converts the input argument to a level.
Return value is either instantiated or used the existing one if there is any.
level | the input level |
default_level | value to return if conversion is not possible. |
LOGGER-ERROR | if defaultLevel is nothing and level not found |
|
static |
Converts the input argument to a level.
Return value is either instantiated or used the existing one if there is any.
level_str | the string input level |
default_level | value to return if conversion is not possible. |
LOGGER-ERROR | if default_level is nothing and level_str not found |
|
static |
Returns closest higher logger level.
level | the logger level |
Loggerlevel
or NOTHING
if there is no higher levelLOGGER-ERROR | if level not found |
|
static |
Returns closest lower logger level.
level | the logger level |
Loggerlevel
or NOTHING
if there is no lower levelLOGGER-ERROR | if level not found |
bool Logger::LoggerLevel::isEqual | ( | LoggerLevel | other | ) |
Compares two logger levels.
other | the other level to compares |
bool Logger::LoggerLevel::isGreaterOrEqual | ( | LoggerLevel | other | ) |
Compares logger levels.
other | the other level to compares |