bitsim
Model, simulate, estimate and control robots in C++
Loading...
Searching...
No Matches
bitrl::log Namespace Reference

Enumerations

enum class  Level
 The severity of a message, and the lowest severity a logger writes. More...

Functions

void add_file_sink (const std::string &filename, bool truncate=true)
 Write the messages of every logger to a file as well.
void flush ()
 Write out what the sinks hold.
Level get_level (const std::string &logger)
 The level of the logger with the given name, making it if needed.
void set_level (Level level)
 Set the level of every logger, and of the loggers made later.
void set_pattern (const std::string &pattern)
 Set the format of the messages of every sink, in spdlog's pattern syntax. The default is "[%Y-%m-%d %H:%M:%S.%e] [%n] [%l] %v": the time, the logger, the level and the message.

Enumeration Type Documentation

◆ Level

enum class bitsim::log::Level
strong

The severity of a message, and the lowest severity a logger writes.

Function Documentation

◆ add_file_sink()

void bitsim::log::add_file_sink ( const std::string & filename,
bool truncate = true )

Write the messages of every logger to a file as well.

Parameters
filenameThe file, made if it does not exist
truncateEmpty the file first, rather than appending to it

◆ flush()

Write out what the sinks hold.

◆ get_level()

Level bitsim::log::get_level ( const std::string & logger)

The level of the logger with the given name, making it if needed.

◆ set_level()

Set the level of every logger, and of the loggers made later.

◆ set_pattern()

void bitsim::log::set_pattern ( const std::string & pattern)

Set the format of the messages of every sink, in spdlog's pattern syntax. The default is "[%Y-%m-%d %H:%M:%S.%e] [%n] [%l] %v": the time, the logger, the level and the message.