#include <Logger.hpp>
|
| using | Sink = std::function< void(const std::string &line)> |
| |
◆ Sink
Where finished lines go (without the trailing newline). nullptr (the default) writes to stdout.
◆ format()
| static LogFormat orbit::utils::Logger::format |
( |
| ) |
|
|
static |
◆ init()
| static void orbit::utils::Logger::init |
( |
const std::string & |
level_str | ) |
|
|
static |
◆ level_to_string()
| static std::string orbit::utils::Logger::level_to_string |
( |
LogLevel |
level, |
|
|
bool |
color |
|
) |
| |
|
staticprivate |
◆ log()
| static void orbit::utils::Logger::log |
( |
LogLevel |
level, |
|
|
const char * |
file, |
|
|
int |
line, |
|
|
const std::string & |
msg |
|
) |
| |
|
static |
◆ log_fields()
| static void orbit::utils::Logger::log_fields |
( |
LogLevel |
level, |
|
|
const char * |
file, |
|
|
int |
line, |
|
|
const std::string & |
msg, |
|
|
const LogFields & |
fields |
|
) |
| |
|
static |
A message with structured fields: JSON keys in Json format, key=value pairs in Text format.
◆ set_format() [1/2]
| static void orbit::utils::Logger::set_format |
( |
const std::string & |
format | ) |
|
|
static |
Parses "text" or "json" (case-insensitive); anything else keeps the current format.
◆ set_format() [2/2]
| static void orbit::utils::Logger::set_format |
( |
LogFormat |
format | ) |
|
|
static |
◆ set_sink()
| static void orbit::utils::Logger::set_sink |
( |
Sink |
sink | ) |
|
|
static |
◆ current_level
| LogLevel orbit::utils::Logger::current_level |
|
static |
◆ log_mutex
| std::mutex orbit::utils::Logger::log_mutex |
|
staticprivate |
The documentation for this class was generated from the following file: