#include <elxlog.h>
The log class provides a minimal interface to spdlog for elastix itself. "spdlog" is C++ logging library by Gabi Melman, from https://github.com/gabime/spdlog
Definition at line 31 of file elxlog.h.
|
static bool | setup (const std::string &log_filename, const bool do_log_to_file, const bool do_log_to_stdout, const level log_level={}) |
|
|
static void | info (const std::string &message) |
|
static void | warn (const std::string &message) |
|
static void | error (const std::string &message) |
|
|
static void | info (const std::ostream &stream) |
|
static void | warn (const std::ostream &stream) |
|
static void | error (const std::ostream &stream) |
|
|
static void | info_to_log_file (const std::string &message) |
|
static void | info_to_log_file (const std::ostream &stream) |
|
|
static void | to_stdout (const std::string &message) |
|
static void | to_stdout (const std::ostream &stream) |
|
◆ level
Enumerator |
---|
info | |
warn | |
err | |
off | |
Definition at line 34 of file elxlog.h.
◆ error() [1/2]
static void elastix::log::error |
( |
const std::ostream & | stream | ) |
|
|
static |
Retrieves the string from the specified stream and passes it the corresponding spdlog function.
◆ error() [2/2]
static void elastix::log::error |
( |
const std::string & | message | ) |
|
|
static |
Just passes the message to the corresponding spdlog function.
◆ info() [1/2]
static void elastix::log::info |
( |
const std::ostream & | stream | ) |
|
|
static |
Retrieves the string from the specified stream and passes it the corresponding spdlog function.
◆ info() [2/2]
static void elastix::log::info |
( |
const std::string & | message | ) |
|
|
static |
Just passes the message to the corresponding spdlog function.
◆ info_to_log_file() [1/2]
static void elastix::log::info_to_log_file |
( |
const std::ostream & | stream | ) |
|
|
static |
Passes the message only to the log file, not to stdout.
◆ info_to_log_file() [2/2]
static void elastix::log::info_to_log_file |
( |
const std::string & | message | ) |
|
|
static |
Passes the message only to the log file, not to stdout.
◆ setup()
static bool elastix::log::setup |
( |
const std::string & | log_filename, |
|
|
const bool | do_log_to_file, |
|
|
const bool | do_log_to_stdout, |
|
|
const level | log_level = {} ) |
|
static |
Does setup the logging system. Optionally enables log to file and/or log to stdout.
◆ to_stdout() [1/2]
static void elastix::log::to_stdout |
( |
const std::ostream & | stream | ) |
|
|
static |
Passes the message only to stdout, not to the log file.
◆ to_stdout() [2/2]
static void elastix::log::to_stdout |
( |
const std::string & | message | ) |
|
|
static |
Passes the message only to stdout, not to the log file.
◆ warn() [1/2]
static void elastix::log::warn |
( |
const std::ostream & | stream | ) |
|
|
static |
Retrieves the string from the specified stream and passes it the corresponding spdlog function.
◆ warn() [2/2]
static void elastix::log::warn |
( |
const std::string & | message | ) |
|
|
static |
Just passes the message to the corresponding spdlog function.