Quantum Resource Manager and Compiler Infrastructure (QRM&CI) 0.1.0
Logger.h File Reference
Include dependency graph for Logger.h:

Functions

std::shared_ptr< spdlog::logger > mqss::qrmci::makeLogger (std::string_view name, std::string_view logFile={})
 Create a logger writing to the console and, if logFile is given, to a rotating file alongside it.

Variables

constexpr std::size_t mqss::qrmci::MaxLogFileBytes = 50UL * 1024 * 1024
 Largest a single log file grows before it is rotated.
constexpr std::size_t mqss::qrmci::MaxLogFiles = 5
 How many rotated log files are kept alongside the current one.

Detailed Description

The console-plus-file logger every QRM&CI daemon installs as its process-wide default.

Definition in file Logger.h.

Function Documentation

◆ makeLogger()

std::shared_ptr< spdlog::logger > mqss::qrmci::makeLogger ( std::string_view name,
std::string_view logFile = {} )
inline

Create a logger writing to the console and, if logFile is given, to a rotating file alongside it.

Parameters
nameThe logger name, as it appears in each log line.
logFileThe file to rotate through, or empty for console only.
Returns
The logger, ready to be installed as the process-wide default.

Definition at line 36 of file Logger.h.

Variable Documentation

◆ MaxLogFileBytes

std::size_t mqss::qrmci::MaxLogFileBytes = 50UL * 1024 * 1024
inlineconstexpr

Largest a single log file grows before it is rotated.

Definition at line 26 of file Logger.h.

◆ MaxLogFiles

std::size_t mqss::qrmci::MaxLogFiles = 5
inlineconstexpr

How many rotated log files are kept alongside the current one.

Definition at line 28 of file Logger.h.