Loading...
Searching...
No Matches
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]

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]

void elastix::log::error | ( | const std::string & | message | ) |

static

Just passes the message to the corresponding spdlog function.

## info() [1/2]

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]

void elastix::log::info | ( | const std::string & | message | ) |

static

Just passes the message to the corresponding spdlog function.

## info_to_log_file() [1/2]

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]

void elastix::log::info_to_log_file | ( | const std::string & | message | ) |

static

Passes the message only to the log file, not to stdout.

## setup()

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]

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]

void elastix::log::to_stdout | ( | const std::string & | message | ) |

static

Passes the message only to stdout, not to the log file.

## warn() [1/2]

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]

void elastix::log::warn | ( | const std::string & | message | ) |

static

Just passes the message to the corresponding spdlog function.

Generated on 1768596610 for elastix by 1.15.0 |