326 worker(
string id, LoggerAppender appender, list<auto> events);
370 constructor(*
string name);
374 auto serializeImpl(LoggerEvent event);
378 processEventImpl(
int type,
auto params);
475 constructor(*
string name, LoggerLayout layout, *
string encoding) : LoggerAppenderFile(name, layout,
'', encoding) {}
617 hash<auto> patternData;
855 constructor(
int min_value,
int max_value = Qore::Logger::LoggerLevel::OFF);
941 setRegex(
string regex_str,
bool regex_result = True);
992 log(
int level,
string message, ...);
1002 log(
string level,
string message, ...);
1026 logArgs(
int level,
string message, *softlist<auto> args);
1038 logArgs(
string level,
string message, *softlist<auto> args);
1239 processEventImpl(
int type,
auto params);
Abstract class for file appenders with rotation support.
Definition: Logger.qm.dox.h:467
const EVENT_ROTATE
rotate event
Definition: Logger.qm.dox.h:471
const DEFAULT_ROTATION_COUNT
default value for rotation chain
Definition: Logger.qm.dox.h:473
abstract int getCount()
Abstract method to get count of rotation objects.
Implements appender writing to a file with archive support.
Definition: Logger.qm.dox.h:707
constructor(*string name, LoggerLayout layout, string filename, string archive=DEFAULT_ARCHIVE_PATTERN, *string encoding)
Creates the object.
processEventImpl(int type, auto params)
Implements archiving, handles the archive event directly, passes all other events to the subclass for...
const DEFAULT_DATE_FORMAT
default date format
Definition: Logger.qm.dox.h:713
string archive()
Posts an archive event.
const EVENT_ARCHIVE
archive event
Definition: Logger.qm.dox.h:711
const DEFAULT_ARCHIVE_PATTERN
default archive pattern
Definition: Logger.qm.dox.h:715
*string resolveField(auto data, string key, *string option)
Returns a string for a format field for a pattern-based filename or archive file name.
string getArchiveFileName()
Returns the archive filename.
Implemants appender writing to a file with file circular rotation support.
Definition: Logger.qm.dox.h:610
int getCount()
Returns number of files in ring.
const DEFAULT_DATE_FORMAT
default date format
Definition: Logger.qm.dox.h:614
constructor(*string name, LoggerLayout layout, string pattern, int count=DEFAULT_ROTATION_COUNT, *string encoding)
Creates the object.
processEventImpl(int type, auto params)
Implements filename rotation; handles the open and rotate events directly; passes all other events to...
*string resolveField(auto data, string key, *string option)
Returns a string for a format field for a pattern-based filename.
int getCurrentIndex()
Returns current ring index being used for logging.
Implements appender writing to a file with file rotation support.
Definition: Logger.qm.dox.h:487
string getArchiveFileName(int idx)
Returns the archive filename.
const DEFAULT_ARCHIVE_PATTERN
default archive pattern
Definition: Logger.qm.dox.h:491
processEventImpl(int type, auto params)
Implements filename rotation; handles the open and rotate events directly.
*string resolveField(auto data, string key, *string option)
Returns a string for a format field for a pattern-based filename.
int getCount()
Returns max.number of files in chain.
constructor(*string name, LoggerLayout layout, string filename, int count=DEFAULT_ROTATION_COUNT, string archive=DEFAULT_ARCHIVE_PATTERN, *string encoding)
Creates the object.
Implements appender which does nothing.
Definition: Logger.qm.dox.h:367
Handles the processing for asynchronous appender events in multiple threads.
Definition: Logger.qm.dox.h:296
worker(string id, LoggerAppender appender, list< auto > events)
Implements worker thread code.
constructor(ThreadPool tp, int max_threads=-1)
Creates the object.
Counter runningCounter(0)
number of running worker threads
process(timeout ms=0)
Processes queue events.
Sequence lastId(0)
internal unique counter
hash< auto > pendingEvents
events removed from queue but not passed to worker thread
Definition: Logger.qm.dox.h:307
Mutex lock()
to protect process()
ThreadPool threadPool
worker thread pool
Definition: Logger.qm.dox.h:301
Queue finishedEvents()
queue of processed events in worker threads
ThreadPool getThreadPool()
Returns the assigned ThreadPool.
int size()
Gets number of pending events.
hash< auto > processingEvents
events paseed to worker thread
Definition: Logger.qm.dox.h:309
int maxThreads
max.number of worker threads
Definition: Logger.qm.dox.h:305
Implements appender writing to a stderr file.
Definition: Logger.qm.dox.h:447
constructor(*string name, LoggerLayout layout)
Creates the object.
processEventImpl(int type, auto params)
Processes log events with the file and ignores all other events including open, close.
Implements appender writing to a stdout file.
Definition: Logger.qm.dox.h:423
processEventImpl(int type, auto params)
Processes log events with the file and ignores all other events including open, close.
constructor(*string name, LoggerLayout layout)
Creates the object.
implements appender writing to an output stream via StreamWriter
Definition: Logger.qm.dox.h:386
bool closed
closed flag
Definition: Logger.qm.dox.h:393
bool hasAssignThread()
Returns True if assigning a thread for a stream.
constructor(*string name, LoggerLayout layout, StreamWriter writer)
Creates the object.
StreamWriter getStreamWriter()
Returns the stream writer object.
bool assignThread
assign thread for stream
Definition: Logger.qm.dox.h:395
processEventImpl(int type, auto params)
Processes open, log, and close events with the output stream; all other events are ignored.
StreamWriter writer
stream writer
Definition: Logger.qm.dox.h:391
Implements callable parameter which is evaluated in run-time when event is rendered.
Definition: Logger.qm.dox.h:264
constructor(code func)
Creates object.
auto call()
Call function with arguments provided.
Implements the filter according event LoggerLevel.
Definition: Logger.qm.dox.h:831
int eval(LoggerEvent event)
Implements filtering by level.
Qore::Logger::LoggerLevel getMaxLevel()
Returns the maximum logging level.
setMinLevel(LoggerLevel value)
Sets the minimum logging level.
setMaxLevel(string value)
Sets the maximum logging level.
constructor(Qore::Logger::LoggerLevel min_value=Qore::Logger::LoggerLevel::LevelInfo, Qore::Logger::LoggerLevel max_value=Qore::Logger::LoggerLevel::LevelOff)
Creates the object.
setMinLevel(int value)
Sets the minimum logging level.
Qore::Logger::LoggerLevel minLevel
min.level
Definition: Logger.qm.dox.h:836
Qore::Logger::LoggerLevel maxLevel
max.level
Definition: Logger.qm.dox.h:838
constructor(string min_value, string max_value='OFF')
Creates the object.
setMaxLevel(LoggerLevel value)
Sets the maximum logging level.
constructor(int min_value, int max_value=Qore::Logger::LoggerLevel::OFF)
Creates the object.
setMinLevel(string value)
Sets the minimum logging level.
setMaxLevel(int value)
Sets the maximum logging level.
LoggerLevel getMinLevel()
Returns the minimum logging level.
Implements filtering according to a regular expression on the event message.
Definition: Logger.qm.dox.h:917
int eval(LoggerEvent event)
Evaluates the regex and compares with the expected result.
constructor(string regex_str='', bool regex_result=True)
Creates the object.
string regexStr
regular string
Definition: Logger.qm.dox.h:922
setRegex(string regex_str, bool regex_result=True)
Sets the regular expression and the expected result for the filter.
string getRegex()
Returns the current regex.
bool getRegexResult()
Returns the expected result.
bool regexResult
expected result
Definition: Logger.qm.dox.h:924
Implements the root class for loggers; does not allow a parent logger to be set.
Definition: Logger.qm.dox.h:1190
setParent(*Logger value)
Overrides value setter as the root logger cannot have a parent; this method always throws an exceptio...
constructor(string level)
setLevel(*LoggerLevel value)
Overrides the level setter to prevent setting the root logger's level to NOTHING (an exception is thr...
constructor(LoggerLevel level=LoggerLevel::getLevelAll())
Class handling a LoggerInterface object as a member and providing atomic logging through it.
Definition: Logger.qm.dox.h:954
constructor()
Creates the object with no logger.
warn(string message,...)
Logs a message object with the WARN level.
log(int level, string message,...)
Logs a message using the provided logging level if a logger is set.
log(Qore::Logger::LoggerLevel level, string message,...)
Logs a message using the provided logging level if a logger is set.
debug(string message,...)
Logs a message object with the DEBUG level.
fatal(string message,...)
Logs a message object with the FATAL level.
traceVar(string var_name, auto value)
Logs the variable name and value using TRACE level.
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.
debugVar(string var_name, auto value)
Logs the variable name and value using DEBUG level.
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...
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...
log(string level, string message,...)
Logs a message using the provided logging level if a logger is set.
bool isErrorEnabled()
Checks whether this Logger is enabled for the ERROR Level.
bool isEnabledFor(LoggerLevel level)
Checks whether this Logger is enabled for a given Level passed as parameter.
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...
trace(string message,...)
Logs a message object with the TRACE level.
error(string message,...)
Logs a message object with the ERROR level.
setLogger(*LoggerInterface logger)
Accepts a LoggerInterface object for logging (or clears it)
transient *LoggerInterface logger
The logger interface.
Definition: Logger.qm.dox.h:959
constructor(LoggerInterface logger)
Creates the object with a logger.
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 isEnabledFor(string level)
Checks whether this Logger is enabled for a given Level passed as parameter.
bool isTraceEnabled()
Checks whether this Logger is enabled for the TRACE Level.
info(string message,...)
Logs a message object with the INFO level.
logEvent(LoggerEvent event)
Logs an already prepared logging event object.
assertLog(bool assertion, string message,...)
Performs logging of assertions.
bool isWarnEnabled()
Checks whether this Logger is enabled for the WARN Level.
Appender for logging to the console.
Definition: Logger.qm.dox.h:1233
The Logger namespace contains all the definitions in the Logger module.
Definition: Logger.qm.dox.h:243