![]() |
Qore logger_bin Module 2.1.1
|
Abstract class that defines the interface for logger events. More...
#include <QC_LoggerEvent.dox.h>
Public Member Methods | |
constructor (object logger, LoggerLevel level, string message, *list< auto > msg_args, *hash< CallStackInfo > location_info, *int thread_id, *date time_stamp, *hash< ExceptionInfo > throwable) | |
Instantiates a LoggingEvent from the supplied parameters. | |
constructor (string fqcn, softstring category, LoggerLevel level, string message, *list< auto > msg_args, *hash< CallStackInfo > location_info, *int thread_id, *date time_stamp, *hash< ExceptionInfo > throwable) | |
Instantiates a LoggingEvent from the supplied parameters. | |
string | getCategoryName () |
Returns the category name. | |
string | getFullQualifiedClassname () |
Returns the full qualified classname. | |
LoggerLevel | getLevel () |
Returns the level of this event. | |
*hash< CallStackInfo > | getLocationInfo () |
Returns the location information for this logging event. | |
*object | getLogger () |
Returns the logger which created the event. | |
string | getMessage () |
Returns the string message for the logging event. | |
date | getRelativeTime () |
Returns a relative timestamp for the event. | |
int | getThreadId () |
Returns the thread id which is related to event. | |
*hash< ExceptionInfo > | getThrowableInfo () |
Returns throwable info, if any. | |
date | getTimeStamp () |
Returns the event timestamp as an absolute date/time value. | |
int | getUniqueId () |
Generates a globally unique integer identifier and associates it to the event. | |
Abstract class that defines the interface for logger events.
Event data (LoggerEvent) are formatted before the record is passed to the target
Qore::Logger::LoggerEvent::constructor | ( | object | logger, |
LoggerLevel | level, | ||
string | message, | ||
*list< auto > | msg_args, | ||
*hash< CallStackInfo > | location_info, | ||
*int | thread_id, | ||
*date | time_stamp, | ||
*hash< ExceptionInfo > | throwable | ||
) |
Instantiates a LoggingEvent from the supplied parameters.
The category becomes logger name and fqcn logger class name
logger | Instance of the Logger class |
level | The event level |
message | The payload as format for sprintf() |
msg_args | The arguments for formatting |
location_info | code location related to logging event |
thread_id | thread related to the event, Default: gettid() |
time_stamp | logging event timestamp. Default value is now_us() |
throwable | The throwable ExceptionInfo associated with the logging event |
Qore::Logger::LoggerEvent::constructor | ( | string | fqcn, |
softstring | category, | ||
LoggerLevel | level, | ||
string | message, | ||
*list< auto > | msg_args, | ||
*hash< CallStackInfo > | location_info, | ||
*int | thread_id, | ||
*date | time_stamp, | ||
*hash< ExceptionInfo > | throwable | ||
) |
Instantiates a LoggingEvent from the supplied parameters.
fqcn | name of the caller class. |
category | The event category. |
level | The event level |
message | The payload as format for sprintf() |
msg_args | The arguments for formatting |
location_info | code location related to logging event |
thread_id | thread related to the event, Default: gettid() |
time_stamp | logging event timestamp. Default value is now_us() |
throwable | The throwable ExceptionInfo associated with the logging event |
string Qore::Logger::LoggerEvent::getMessage | ( | ) |
Returns the string message for the logging event.
Potential callable references are evaluated. Next the message is rendered using vsprintf() and the result is cached, so the message is rendered only once.
date Qore::Logger::LoggerEvent::getRelativeTime | ( | ) |
Returns a relative timestamp for the event.
Returns a relative date/time value for the amount of time passed from the beginning of execution to the time when the event was constructed.