Writes log entries to rotating files in the background. Used internally by Server and Client.
More...
#include <logger.h>
|
| | Logger (boost::asio::io_context &ioc, LoggerConfig config={}) |
| | Creates a logger. If config.enabled is false it does nothing.
|
|
void | unsafeFlushNow () |
| | Writes all buffered entries to disk immediately on the calling thread. Only safe when no other thread is logging.
|
|
void | flush () |
| | Asks the logger to write buffered entries to disk. Returns immediately.
|
|
void | push (Log log) |
| | Adds an entry to the log. Returns immediately. Ignored when logging is disabled.
|
Writes log entries to rotating files in the background. Used internally by Server and Client.
◆ Logger()
| acsf::Logger::Logger |
( |
boost::asio::io_context & | ioc, |
|
|
LoggerConfig | config = {} ) |
|
inline |
Creates a logger. If config.enabled is false it does nothing.
- Parameters
-
| ioc | I/O context the logger runs on. |
| config | Logging settings. |
The documentation for this class was generated from the following file: