Loading...
Searching...
No Matches
Logger::LoggerRoot Class Reference

Implements the root class for loggers; does not allow a parent logger to be set. More...

Inheritance diagram for Logger::LoggerRoot:
[legend]

## Public Member Functions

| constructor (int level)
| constructor (LoggerLevel level=LoggerLevel::getLevelAll())
| constructor (string level)
| setLevel (*LoggerLevel value)
| Overrides the level setter to prevent setting the root logger's level to NOTHING (an exception is thrown in this case).
| setParent (*Logger value)
| Overrides value setter as the root logger cannot have a parent; this method always throws an exception if the argument is a value.
Public Member Functions inherited from Logger::Logger
| addAppender (LoggerAppender appender)
| Adds an appender to the appender list.
| callAppenders (LoggerEvent event)
| Forwards the given logging event to all linked appenders.
| constructor (LoggerLevel level)
| Creates the object with an empty name and the given initial level.
| constructor (string name, LoggerLevel level)
| Creates the object.
| constructor (string name='')
| Creates the object.
*LoggerLevel | decLevel ()
| Decrement logger level.
bool | getAdditivity ()
| Returns the additivity flag.
list< LoggerAppender > | getAppenders ()
| Returns the appender list.
*LoggerLevel | getLevel (bool effective=True)
| Returns the logging level.
string | getName ()
| Returns the logger name.
*Logger | getParent ()
| Returns the parent logger, if any.
*LoggerLevel | incLevel ()
| Increment logger level.
| removeAllAppenders ()
| Clears the appender list by removing all appenders.
| removeAppender (LoggerAppender appender)
| Removes the appender from the list.
| setAdditivity (bool enable)
| Sets the additivity flag; when additivity is active, events are passed to parent loggers.
| setLevel (*LoggerLevel level)
| Sets the logging level.
| setLevel (int level)
| Sets the logging level.
| setLevel (string level)
| Sets the logging level.
| setParent (*Logger value)
| Sets the parent logger.

## Additional Inherited Members

Protected Member Functions inherited from Logger::Logger
hash< CallStackInfo > | getLocation ()
| Returns the call location where the log function was called from.

## Detailed Description

Implements the root class for loggers; does not allow a parent logger to be set.

## Member Function Documentation

## constructor() [1/3]

Logger::LoggerRoot::constructor | ( | int | level | ) |

Parameters

  level | initial log level

## constructor() [2/3]

Logger::LoggerRoot::constructor | ( | LoggerLevel | level = `LoggerLevel::getLevelAll()` | ) |

Parameters

  level | initial log level

## constructor() [3/3]

Logger::LoggerRoot::constructor | ( | string | level | ) |

Parameters

  level | initial log level

## setLevel()

Logger::LoggerRoot::setLevel | ( | *LoggerLevel | value | ) |

Overrides the level setter to prevent setting the root logger's level to NOTHING (an exception is thrown in this case).

The root logger must always have a level.

Parameters

  value | the level to set

Exceptions

  LOGGER-ERROR | if level is NOTHING

## setParent()

Logger::LoggerRoot::setParent | ( | *Logger | value | ) |

Overrides value setter as the root logger cannot have a parent; this method always throws an exception if the argument is a value.

Exceptions

  LOGGER-ERROR | if parent exists