Qore Logger Module Reference 0.6
Loading...
Searching...
No Matches
Logger::LoggerRoot Class Reference

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

#include <Logger.qm.dox.h>

Inheritance diagram for Logger::LoggerRoot:
[legend]

Public Member Methods

 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). More...
 
 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. More...
 
- Public Member Methods inherited from Logger::Logger
 addAppender (LoggerAppender appender)
 Adds an appender to the appender list. More...
 
 assertLog (bool assertion, string message,...)
 Performs logging of assertions. More...
 
 callAppenders (LoggerEvent event)
 Forwards the given logging event to all linked appenders. More...
 
 constructor (LoggerLevel level)
 Creates the object with an empty name and the given initial level. More...
 
 constructor (string name, LoggerLevel level)
 Creates the object. More...
 
 constructor (string name='')
 Creates the object. More...
 
 debug (string message,...)
 Logs a message object with the DEBUG level. More...
 
 debugVar (string var_name, auto value)
 Logs the variable name and value using DEBUG level. More...
 
*LoggerLevel decLevel ()
 Decrement logger level. More...
 
 error (string message,...)
 Logs a message object with the ERROR level. More...
 
 fatal (string message,...)
 Logs a message object with the FATAL level. More...
 
bool getAdditivity ()
 Returns the additivity flag.
 
list< LoggerAppendergetAppenders ()
 Returns the appender list. More...
 
*LoggerLevel getLevel (bool effective=True)
 Returns the logging level. More...
 
string getName ()
 Returns the logger name.
 
*Logger getParent ()
 Returns the parent logger, if any.
 
*LoggerLevel incLevel ()
 Increment logger level. More...
 
 info (string message,...)
 Logs a message object with the INFO level. More...
 
bool isDebugEnabled ()
 Checks whether this Logger is enabled for the DEBUG Level.
 
bool isEnabledFor (int level)
 Checks whether this Logger is enabled for a given Level passed as parameter. More...
 
bool isEnabledFor (LoggerLevel level)
 Checks whether this Logger is enabled for a given Level passed as parameter. More...
 
bool isEnabledFor (string level)
 Checks whether this Logger is enabled for a given Level passed as parameter. More...
 
bool isErrorEnabled ()
 Checks whether this Logger is enabled for the ERROR Level.
 
bool isFatalEnabled ()
 Checks whether this Logger is enabled for the FATAL Level.
 
bool isInfoEnabled ()
 Checks whether this Logger is enabled for the INFO Level.
 
bool isTraceEnabled ()
 Checks whether this Logger is enabled for the TRACE Level.
 
bool isWarnEnabled ()
 Checks whether this Logger is enabled for the WARN Level.
 
 log (int level, string message)
 Logs a message using the provided logging level. More...
 
 log (LoggerLevel level, string message)
 Logs a message using the provided logging level. More...
 
 log (string level, string message)
 Logs a message using the provided logging level. More...
 
 logArgs (int level, string message, *softlist< auto > args)
 Logs a message using the provided logging level and a single argument for any format string arguments. More...
 
 logArgs (LoggerLevel level, string message, *softlist< auto > args)
 Logs a message using the provided logging level and a single argument for any format string arguments. More...
 
 logArgs (string level, string message, *softlist< auto > args)
 Logs a message using the provided logging level and a single argument for any format string arguments. More...
 
 logEvent (LoggerEvent event)
 Logs an already prepared logging event object. More...
 
 removeAllAppenders ()
 Clears the appender list by removing all appenders.
 
 removeAppender (LoggerAppender appender)
 Removes the appender from the list. More...
 
 setAdditivity (bool enable)
 Sets the additivity flag; when additivity is active, events are passed to parent loggers. More...
 
 setLevel (*LoggerLevel level)
 Sets the logging level. More...
 
 setLevel (int level)
 Sets the logging level. More...
 
 setLevel (string level)
 Sets the logging level. More...
 
 setParent (*Logger value)
 Sets the parent logger. More...
 
 trace (string message,...)
 Logs a message object with the TRACE level. More...
 
 traceVar (string var_name, auto value)
 Logs the variable name and value using TRACE level. More...
 
 warn (string message,...)
 Logs a message object with the WARN level. More...
 
abstract assertLog (bool assertion, string message,...)
 Performs logging of assertions. More...
 
abstract debug (string message,...)
 Logs a message object with the DEBUG level. More...
 
abstract debugVar (string var_name, auto value)
 Logs the variable name and value using DEBUG level. More...
 
abstract error (string message,...)
 Logs a message object with the ERROR level. More...
 
abstract fatal (string message,...)
 Logs a message object with the FATAL level. More...
 
abstract info (string message,...)
 Logs a message object with the INFO level. More...
 
abstract bool isDebugEnabled ()
 Checks whether this Logger is enabled for the DEBUG Level.
 
abstract bool isEnabledFor (int level)
 Checks whether this Logger is enabled for a given Level passed as parameter. More...
 
abstract bool isEnabledFor (LoggerLevel level)
 Checks whether this Logger is enabled for a given Level passed as parameter. More...
 
abstract bool isEnabledFor (string level)
 Checks whether this Logger is enabled for a given Level passed as parameter. More...
 
abstract bool isErrorEnabled ()
 Checks whether this Logger is enabled for the ERROR Level.
 
abstract bool isFatalEnabled ()
 Checks whether this Logger is enabled for the FATAL Level.
 
abstract bool isInfoEnabled ()
 Checks whether this Logger is enabled for the INFO Level.
 
abstract bool isTraceEnabled ()
 Checks whether this Logger is enabled for the TRACE Level.
 
abstract bool isWarnEnabled ()
 Checks whether this Logger is enabled for the WARN Level.
 
abstract log (int level, string message)
 Logs a message using the provided logging level. More...
 
abstract log (LoggerLevel level, string message)
 Logs a message using the provided logging level. More...
 
abstract log (string level, string message)
 Logs a message using the provided logging level. More...
 
abstract logArgs (int level, string message, *softlist< auto > args)
 Logs a message using the provided logging level and a single argument for any format string arguments. More...
 
abstract logArgs (LoggerLevel level, string message, *softlist< auto > args)
 Logs a message using the provided logging level and a single argument for any format string arguments. More...
 
abstract logArgs (string level, string message, *softlist< auto > args)
 Logs a message using the provided logging level and a single argument for any format string arguments. More...
 
abstract logEvent (LoggerEvent event)
 Logs an already prepared logging event object. More...
 
abstract trace (string message,...)
 Logs a message object with the TRACE level. More...
 
abstract traceVar (string var_name, auto value)
 Logs the variable name and value using TRACE level. More...
 
abstract warn (string message,...)
 Logs a message object with the WARN level. More...
 

Additional Inherited Members

- Private Member Methods 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
levelinitial log level

◆ constructor() [2/3]

Logger::LoggerRoot::constructor ( LoggerLevel  level = LoggerLevel::getLevelAll())
Parameters
levelinitial log level

◆ constructor() [3/3]

Logger::LoggerRoot::constructor ( string  level)
Parameters
levelinitial 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
valuethe level to set
Exceptions
LOGGER-ERRORif 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-ERRORif parent exists