![]() |
Qore logger_bin Module 2.0.0
|
This is the base class for logger levels. More...
#include <QC_Logger.dox.h>
Public Member Functions | |
| addAppender (LoggerAppender appender) | |
| Adds an appender to the appender list. | |
| assertLog (bool assertion, string message,...) | |
| Performs logging of assertions. | |
| callAppenders (LoggerEvent event) | |
| Forwards the given logging event to all linked appenders. | |
| constructor () | |
| Creates the Logger. | |
| constructor (string name) | |
| Creates the Logger. | |
| constructor (string name, string level) | |
| Creates the Logger with the supplied arguments. | |
| constructor (string name, int level) | |
| Creates the Logger with the supplied arguments. | |
| constructor (string name, LoggerLevel level) | |
| Creates the Logger with the supplied arguments. | |
| constructor (LoggerLevel level) | |
| Creates the Logger with the supplied arguments. | |
| debug (string message,...) | |
| Logs a message object with the DEBUG level. | |
| debugVar (string var_name, auto value) | |
| Logs the variable name and value using DEBUG level. | |
| *LoggerLevel | decLevel () |
| Decrement logger level. | |
| detail (string message,...) | |
| Logs a message object with the DETAIL level. | |
| error (string message,...) | |
| Logs a message object with the ERROR level. | |
| fatal (string message,...) | |
| Logs a message object with the FATAL 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. | |
| info (string message,...) | |
| Logs a message object with the INFO level. | |
| bool | isDebugEnabled () |
| Checks whether this Logger is enabled for the DEBUG Level. | |
| bool | isDetailEnabled () |
| Checks whether this Logger is enabled for the DETAIL Level. | |
| bool | isEnabledFor (LoggerLevel level) |
| Checks whether this Logger is enabled for a given Level passed as parameter. | |
| bool | isEnabledFor (int level) |
| Checks whether this Logger is enabled for a given Level passed as parameter. | |
| bool | isEnabledFor (string level) |
| Checks whether this Logger is enabled for a given Level passed as parameter. | |
| 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 (LoggerLevel level, string message,...) | |
| Logs a message using the provided logging level. | |
| log (int level, string message,...) | |
| Logs a message using the provided logging level. | |
| log (string level, string message,...) | |
| Logs a message using the provided logging level. | |
| logArgs (LoggerLevel level, string message, *softlist< auto > margs) | |
| Logs a message using the provided logging level and a single argument for any format string arguments. | |
| logArgs (int level, string message, *softlist< auto > margs) | |
| Logs a message using the provided logging level and a single argument for any format string arguments. | |
| logArgs (string level, string message, *softlist< auto > margs) | |
| Logs a message using the provided logging level and a single argument for any format string arguments. | |
| logEvent (LoggerEvent event) | |
| Logs an already prepared logging event object. | |
| 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 (string level) | |
| Sets the logging level. | |
| setLevel (int level) | |
| Sets the logging level. | |
| setParent (*Logger parent) | |
| Sets the parent logger. | |
| trace (string message,...) | |
| Logs a message object with the TRACE level. | |
| traceVar (string var_name, auto value) | |
| Logs the variable name and value using TRACE level. | |
| warn (string message,...) | |
| Logs a message object with the WARN level. | |
Public Member Functions inherited from Qore::Logger::LoggerInterface | |
| abstract | assertLog (bool assertion, string message,...) |
| Performs logging of assertions. | |
| constructor () | |
| Creates the level with the supplied arguments. | |
| abstract | debug (string message,...) |
| Logs a message object with the DEBUG level. | |
| abstract | debugVar (string var_name, auto value) |
| Logs the variable name and value using DEBUG level. | |
| abstract *LoggerLevel | decLevel () |
| Decrement logger level. | |
| abstract | error (string message,...) |
| Logs a message object with the ERROR level. | |
| abstract | fatal (string message,...) |
| Logs a message object with the FATAL level. | |
| abstract *LoggerLevel | getLevel (bool effective=True) |
| Returns the logging level. | |
| abstract *LoggerLevel | incLevel () |
| Increment logger level. | |
| abstract | info (string message,...) |
| Logs a message object with the INFO level. | |
| abstract bool | isDebugEnabled () |
| Checks whether this Logger is enabled for the DEBUG Level. | |
| abstract bool | isEnabledFor (Qore::Logger::LoggerLevel level) |
| Checks whether this Logger is enabled for a given Level passed as parameter. | |
| abstract bool | isEnabledFor (int level) |
| Checks whether this Logger is enabled for a given Level passed as parameter. | |
| abstract bool | isEnabledFor (string level) |
| Checks whether this Logger is enabled for a given Level passed as parameter. | |
| 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. | |
| bool | isLogger (LoggerInterface logger) |
| Returns True if the passed logger is the logger used to log, False if not. | |
| 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 (Qore::Logger::LoggerLevel level, string message,...) |
| Logs a message using the provided logging level. | |
| abstract | log (int level, string message,...) |
| Logs a message using the provided logging level. | |
| abstract | log (string level, string message,...) |
| Logs a message using the provided logging level. | |
| abstract | logArgs (Qore::Logger::LoggerLevel level, string message, *softlist< auto > args) |
| Logs a message using the provided logging level and a single argument for any format string arguments. | |
| 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. | |
| 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. | |
| abstract | logEvent (LoggerEvent event) |
| Logs an already prepared logging event object. | |
| abstract | setLevel (*Qore::Logger::LoggerLevel level) |
| Sets the logging level. | |
| abstract | setLevel (string level) |
| Sets the logging level. | |
| abstract | setLevel (int level) |
| Sets the logging level. | |
| abstract | trace (string message,...) |
| Logs a message object with the TRACE level. | |
| abstract | traceVar (string var_name, auto value) |
| Logs the variable name and value using TRACE level. | |
| abstract | warn (string message,...) |
| Logs a message object with the WARN level. | |
Public Member Functions inherited from Qore::Serializable | |
Static Protected Member Functions | |
| static hash< CallStackInfo > | getLocation () |
| Returns the call location where the log function was called from. | |
This is the base class for logger levels.
This class stores the integer and string log level values
| Qore::Logger::Logger::addAppender | ( | LoggerAppender | appender | ) |
Adds an appender to the appender list.
| appender | add a new LoggerAppender |
| LOGGER-ERROR | exception if appender is already in list |
| Qore::Logger::Logger::assertLog | ( | bool | assertion, |
| string | message, | ||
| ... ) |
Performs logging of assertions.
If the assertion parameter is False, then the message is logged using the ERROR level.
| assertion | the boolean assertion value |
| message | a string to log used as a format string for vsprintf(). Optional arguments are passed to the Qore::Logger::LoggerEvent object. If the last parameter is an ExceptionInfo typed hash, then it is considered "throwable" information. |
| Qore::Logger::Logger::callAppenders | ( | LoggerEvent | event | ) |
Forwards the given logging event to all linked appenders.
| event | the event to forward |
| Qore::Logger::Logger::constructor | ( | LoggerLevel | level | ) |
Creates the Logger with the supplied arguments.
| level | the initial level for the logger |
| Qore::Logger::Logger::constructor | ( | string | name | ) |
Creates the Logger.
| name | the name of the logger |
Creates the Logger with the supplied arguments.
| name | the name of the logger |
| level | the initial level for the logger |
| Qore::Logger::Logger::constructor | ( | string | name, |
| LoggerLevel | level ) |
Creates the Logger with the supplied arguments.
| name | the name of the logger |
| level | the initial level for the logger |
Creates the Logger with the supplied arguments.
| name | the name of the logger |
| level | the initial level for the logger |
| Qore::Logger::Logger::debug | ( | string | message, |
| ... ) |
Logs a message object with the DEBUG level.
| message | a string to log used as a format string for vsprintf(). Optional arguments are passed to the Qore::Logger::LoggerEvent object. If the last parameter is an ExceptionInfo typed hash, then it is considered "throwable" information. |
| Qore::Logger::Logger::debugVar | ( | string | var_name, |
| auto | value ) |
Logs the variable name and value using DEBUG level.
| var_name | the variable name |
| value | the value of the variable |
| *LoggerLevel Qore::Logger::Logger::decLevel | ( | ) |
Decrement logger level.
LoggerLevel | Qore::Logger::Logger::detail | ( | string | message, |
| ... ) |
Logs a message object with the DETAIL level.
| message | a string to log used as a format string for vsprintf(). Optional arguments are passed to the Qore::Logger::LoggerEvent object. If the last parameter is an ExceptionInfo typed hash, then it is considered "throwable" information. |
| Qore::Logger::Logger::error | ( | string | message, |
| ... ) |
Logs a message object with the ERROR level.
| message | a string to log used as a format string for vsprintf(). Optional arguments are passed to the Qore::Logger::LoggerEvent object. If the last parameter is an ExceptionInfo typed hash, then it is considered "throwable" information. |
| Qore::Logger::Logger::fatal | ( | string | message, |
| ... ) |
Logs a message object with the FATAL level.
| message | a string to log used as a format string for vsprintf(). Optional arguments are passed to the Qore::Logger::LoggerEvent object. If the last parameter is an ExceptionInfo typed hash, then it is considered "throwable" information. |
| list< LoggerAppender > Qore::Logger::Logger::getAppenders | ( | ) |
Returns the appender list.
Note that the appender list may be manipulated in another thread as internal lock is released when list is returned
| *LoggerLevel Qore::Logger::Logger::getLevel | ( | bool | effective = True | ) |
Returns the logging level.
| effective | if False then get current level which can be NOTHING, if True then get level which might be inherited from parent, Default: True |
| LOGGER-ERROR | if cannot get effective level from hierarchy |
| *LoggerLevel Qore::Logger::Logger::incLevel | ( | ) |
Increment logger level.
LoggerLevel | Qore::Logger::Logger::info | ( | string | message, |
| ... ) |
Logs a message object with the INFO level.
| message | a string to log used as a format string for vsprintf(). Optional arguments are passed to the Qore::Logger::LoggerEvent object. If the last parameter is an ExceptionInfo typed hash, then it is considered "throwable" information. |
| bool Qore::Logger::Logger::isEnabledFor | ( | int | level | ) |
Checks whether this Logger is enabled for a given Level passed as parameter.
| level | the log level to check |
| bool Qore::Logger::Logger::isEnabledFor | ( | LoggerLevel | level | ) |
Checks whether this Logger is enabled for a given Level passed as parameter.
| level | the log level to check |
| bool Qore::Logger::Logger::isEnabledFor | ( | string | level | ) |
Checks whether this Logger is enabled for a given Level passed as parameter.
| level | the log level to check |
Logs a message using the provided logging level.
| level | the logging level. |
| message | a string to log used as a format string for vsprintf(). Optional arguments are passed to the Qore::Logger::LoggerEvent object. If the last parameter is an ExceptionInfo typed hash, then it is considered "throwable" information. |
| Qore::Logger::Logger::log | ( | LoggerLevel | level, |
| string | message, | ||
| ... ) |
Logs a message using the provided logging level.
| level | The logging level. |
| message | a string to log used as a format string for vsprintf(). Optional arguments are passed to the Qore::Logger::LoggerEvent object. If the last parameter is an ExceptionInfo typed hash, then it is considered "throwable" information. |
Logs a message using the provided logging level.
| level | The logging level. |
| message | a string to log used as a format string for vsprintf(). Optional arguments are passed to the Qore::Logger::LoggerEvent object. If the last parameter is an ExceptionInfo typed hash, then it is considered "throwable" information. |
Logs a message using the provided logging level and a single argument for any format string arguments.
| level | the logging level. |
| message | a string to log used as a format string for vsprintf(). Optional arguments are passed to the Qore::Logger::LoggerEvent object. If the last parameter is an ExceptionInfo typed hash, then it is considered "throwable" information. |
| margs | any format string arguments to the log message |
| Qore::Logger::Logger::logArgs | ( | LoggerLevel | level, |
| string | message, | ||
| *softlist< auto > | margs ) |
Logs a message using the provided logging level and a single argument for any format string arguments.
| level | The logging level. |
| message | a string to log used as a format string for vsprintf(). Optional arguments are passed to the Qore::Logger::LoggerEvent object. If the last parameter is an ExceptionInfo typed hash, then it is considered "throwable" information. |
| margs | any format string arguments to the log message |
Logs a message using the provided logging level and a single argument for any format string arguments.
| level | The logging level. |
| message | a string to log used as a format string for vsprintf(). Optional arguments are passed to the Qore::Logger::LoggerEvent object. If the last parameter is an ExceptionInfo typed hash, then it is considered "throwable" information. |
| margs | any format string arguments to the log message |
| Qore::Logger::Logger::logEvent | ( | LoggerEvent | event | ) |
Logs an already prepared logging event object.
| event | the event to log |
| Qore::Logger::Logger::removeAppender | ( | LoggerAppender | appender | ) |
Removes the appender from the list.
| appender | the appender to remove |
| Qore::Logger::Logger::setAdditivity | ( | bool | enable | ) |
Sets the additivity flag; when additivity is active, events are passed to parent loggers.
| enable | the additivity flag; when additivity is active, events are passed to parent loggers |
| Qore::Logger::Logger::setLevel | ( | *LoggerLevel | level | ) |
Sets the logging level.
| level | if nothing then inherits level from parent |
| Qore::Logger::Logger::setLevel | ( | int | level | ) |
Sets the logging level.
| level | the logging level to set |
| Qore::Logger::Logger::setLevel | ( | string | level | ) |
Sets the logging level.
| level | the logging level as a string |
| Qore::Logger::Logger::setParent | ( | *Logger | parent | ) |
Sets the parent logger.
| parent | the parent logger |
| LOGGER-ERROR | in case of circular reference |
| Qore::Logger::Logger::trace | ( | string | message, |
| ... ) |
Logs a message object with the TRACE level.
| message | a string to log used as a format string for vsprintf(). Optional arguments are passed to the Qore::Logger::LoggerEvent object. If the last parameter is an ExceptionInfo typed hash, then it is considered "throwable" information. |
| Qore::Logger::Logger::traceVar | ( | string | var_name, |
| auto | value ) |
Logs the variable name and value using TRACE level.
| var_name | the variable name |
| value | the value of the variable |
| Qore::Logger::Logger::warn | ( | string | message, |
| ... ) |
Logs a message object with the WARN level.
| message | a string to log used as a format string for vsprintf(). Optional arguments are passed to the Qore::Logger::LoggerEvent object. If the last parameter is an ExceptionInfo typed hash, then it is considered "throwable" information. |