Maze Builder Docs 8.2.1
Loading...
Searching...
No Matches
async_logger.h File Reference
#include <condition_variable>
#include <deque>
#include <functional>
#include <mutex>
#include <stop_token>
#include <string>
#include <string_view>
#include <thread>
#include <utility>
#include <vector>
#include <fmt/format.h>
#include <fmt/ranges.h>
Include dependency graph for async_logger.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  mazes::async_logger
 Asynchronous logger class. More...
 

Functions

async_loggermazes::global_async_logger ()
 Get the global async logger instance.
 
void mazes::set_printer_sink (async_logger::sink_type sink)
 Set the sink function for the global async logger.
 
void mazes::reset_printer_sink ()
 Flush the global async logger, blocking until all pending messages are processed.
 
void mazes::flush_printer ()
 Flush the global async logger, blocking until all pending messages are processed.
 
template<typename... Args>
void mazes::printer (Args &&... args)
 Log a message using the global async logger.
 

Function Documentation

◆ global_async_logger()

async_logger & mazes::global_async_logger ( )
inline

Get the global async logger instance.

Returns
Reference to the global async logger

◆ printer()

template<typename... Args>
void mazes::printer ( Args &&... args)

Log a message using the global async logger.

Template Parameters
...ArgsTypes of the arguments to format
Parameters
...argsArguments to format and log

◆ set_printer_sink()

void mazes::set_printer_sink ( async_logger::sink_type sink)
inline

Set the sink function for the global async logger.

Parameters
sinkSink function to handle log messages