go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
Loading...
Searching...
No Matches
Data Structures | Public Types | Static Public Member Functions
elastix::log Class Reference

#include <elxlog.h>

Detailed Description

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.

Data Structures

class  guard
 

Public Types

enum class  level : std::uint8_t { info , warn , err , off }
 

Static Public Member Functions

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)
 

Member Enumeration Documentation

◆ level

enum class elastix::log::level : std::uint8_t
strong
Enumerator
info 
warn 
err 
off 

Definition at line 34 of file elxlog.h.

Member Function Documentation

◆ 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.



Generated on 1739326392 for elastix by doxygen 1.9.8 elastix logo