| Qore logger_bin Module 2.0.0

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
Qore::Logger::LoggerLevel Class Reference

This is the base class for logger levels. More...

`#include <QC_LoggerLevel.dox.h>`

Inheritance diagram for Qore::Logger::LoggerLevel:

## Public Member Functions
| 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.

## Static Public Member Functions
static LoggerLevel | getLevel (int level, *LoggerLevel default_level)
| Converts the input argument to a level.
static LoggerLevel | getLevel (string level_str, *LoggerLevel default_level)
| Converts the input argument to a level.
static LoggerLevel | getLevelAll ()
| Returns an ALL Level.
static LoggerLevel | getLevelDebug ()
| Returns a DEBUG Level.
static LoggerLevel | getLevelDetail ()
| Returns a DETAIL 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.
static *LoggerLevel | getNextLowerLevel (int level)
| Returns closest lower logger level.

## Detailed Description

This is the base class for logger levels.

This class stores the integer and string log level values

## Member Function Documentation

## ◆ 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]

static LoggerLevel Qore::Logger::LoggerLevel::getLevel | ( | int | level,
|  | *LoggerLevel | default_level )
| static

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]

static LoggerLevel Qore::Logger::LoggerLevel::getLevel | ( | string | level_str,
|  | *LoggerLevel | default_level )
| static

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

  level | the logger level

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

  level | the logger level

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:

- modules/logger_bin/src/QC_LoggerLevel.dox.h