Abstract class that defines the interface for logger appenders.
More...
#include <QC_LoggerAppenderQueue.dox.h>
|
| constructor () |
| Creates the object.
|
|
| process (timeout ms=0) |
| Processes queued events.
|
|
bool | push (LoggerAppender appender, int type, auto params) |
| Adds appender event.
|
|
int | size () |
| Returns the current number of events waiting in queue.
|
|
|
*hash< auto > | getEvent (timeout ms) |
| Returns the next event from queue or nothing if there is no event available within the timeout period.
|
|
Abstract class that defines the interface for logger appenders.
Event data (LoggerEvent) are formatted before the record is passed to the target
◆ getEvent()
*hash< auto > Qore::Logger::LoggerAppenderQueue::getEvent |
( |
timeout |
ms | ) |
|
|
private |
Returns the next event from queue or nothing if there is no event available within the timeout period.
- Parameters
-
ms | a timeout value to wait for data to become available on the queue; integers are interpreted as milliseconds; relative date/time values are interpreted literally with a maximum resolution of milliseconds. A value that converts to integer 0 causes the call to time out immediately if the call would otherwise block. If a positive timeout argument is passed, and no data is available in the timeout period then waits up to timeout value, If a negative timeout value is passed as the argument, then the call blocks until data is available on the queue. |
- Returns
- the next event from queue or nothing if there is no event available within the timeout period
◆ process()
Qore::Logger::LoggerAppenderQueue::process |
( |
timeout |
ms = 0 | ) |
|
Processes queued events.
This method should typically be called in a dedicated thread
- Parameters
-
ms | a timeout value to wait for data to become available on the queue; integers are interpreted as milliseconds; relative date/time values are interpreted literally with a maximum resolution of milliseconds. A value that converts to integer 0 causes the call to time out immediately if the call would otherwise block. If a positive timeout argument is passed, and no data is available in the timeout period then waits up to timeout value, If a negative timeout value is passed as the argument, then the call blocks until data is available on the queue. Default value is 0. |
◆ push()
bool Qore::Logger::LoggerAppenderQueue::push |
( |
LoggerAppender |
appender, |
|
|
int |
type, |
|
|
auto |
params |
|
) |
| |
Adds appender event.
- Parameters
-
- Returns
- True if the event was succesfully added to queue
The documentation for this class was generated from the following file:
- QC_LoggerAppenderQueue.dox.h