quill
|
This class can be used when you want to run the backend worker on your own thread. More...
#include <ManualBackendWorker.h>
Public Member Functions | |
ManualBackendWorker (detail::BackendWorker *backend_worker) | |
void | init (BackendOptions options) |
Initializes the ManualBackendWorker with the specified backend options. More... | |
void | poll_one () |
Polls all thread-local SPSC queues and caches the log statements, processing and writing the log statement with the minimum timestamp to the corresponding output sinks. More... | |
void | poll () |
Continuously polls the backend worker until all queues are empty. More... | |
void | poll (std::chrono::microseconds timeout) |
This function behaves like poll() but will stop polling if the specified timeout duration is reached before all queues are emptied. More... | |
This class can be used when you want to run the backend worker on your own thread.
|
inline |
Initializes the ManualBackendWorker with the specified backend options.
This function must be called before any other functions in this class. It configures the backend worker for manual operation, disabling certain options that are incompatible with manual control.
options | The BackendOptions to configure the backend worker. |
|
inline |
Continuously polls the backend worker until all queues are empty.
This function keeps polling until all frontend queues and cached transit events are processed.
|
inline |
This function behaves like poll()
but will stop polling if the specified timeout duration is reached before all queues are emptied.
This can be useful when you want to limit the time spent processing log statements.
|
inline |
Polls all thread-local SPSC queues and caches the log statements, processing and writing the log statement with the minimum timestamp to the corresponding output sinks.
This function should be called periodically by the thread to process and dispatch log entries. It assumes that the init()
function has been called first to properly configure the backend worker.