|
ChainCLI
A modern C++20 command-line interface library
|
Abstract base class for logger implementations. More...
#include <logger.h>
Public Member Functions | |
| virtual void | setLevel (LogLevel lvl)=0 |
| Set the minimum log level for this logger. | |
| virtual void | addHandler (std::unique_ptr< AbstractHandler > handlerPtr)=0 |
| Add a log handler. | |
| virtual void | removeAllHandlers ()=0 |
| Remove all log handlers. | |
| virtual void | log (LogLevel lvl, const std::string &message) const =0 |
| Log a message at the specified log level. | |
| virtual std::ostream & | getStream (LogLevel lvl)=0 |
| Get the stream for the specified log level. | |
| template<typename... Args> | |
| void | log (LogLevel lvl, const std::string &fmt, Args &&...args) const |
| Log a message at the specified log level using a format string to print the passed arguments. | |
| template<typename... Args> | |
| void | trace (const std::string &fmt, Args &&...args) |
| Log a message at the TRACE level. | |
| template<typename... Args> | |
| void | verbose (const std::string &fmt, Args &&...args) |
| Log a message at the VERBOSE level. | |
| template<typename... Args> | |
| void | debug (const std::string &fmt, Args &&...args) |
| Log a message at the DEBUG level. | |
| template<typename... Args> | |
| void | success (const std::string &fmt, Args &&...args) |
| Log a message at the SUCCESS level. | |
| template<typename... Args> | |
| void | info (const std::string &fmt, Args &&...args) |
| Log a message at the INFO level. | |
| template<typename... Args> | |
| void | warning (const std::string &fmt, Args &&...args) |
| Log a message at the WARNING level. | |
| template<typename... Args> | |
| void | error (const std::string &fmt, Args &&...args) |
| Log a message at the ERROR level. | |
| std::ostream & | trace () |
| Get the stream for the TRACE log level. | |
| std::ostream & | verbose () |
| Get the stream for the VERBOSE log level. | |
| std::ostream & | debug () |
| Get the stream for the DEBUG log level. | |
| std::ostream & | success () |
| Get the stream for the SUCCESS log level. | |
| std::ostream & | info () |
| Get the stream for the INFO log level. | |
| std::ostream & | warning () |
| Get the stream for the WARNING log level. | |
| std::ostream & | error () |
| Get the stream for the ERROR log level. | |
Abstract base class for logger implementations.
|
pure virtual |
|
inline |
Get the stream for the DEBUG log level.
|
inline |
Log a message at the DEBUG level.
| ...Args | The argument types for the format string |
| fmt | The format string |
| ...args | The arguments for the format string |
|
inline |
Get the stream for the ERROR log level.
|
inline |
Log a message at the ERROR level.
| ...Args | The argument types for the format string |
| fmt | The format string |
| ...args | The arguments for the format string |
|
pure virtual |
Get the stream for the specified log level.
| lvl | The log level |
Implemented in cli::logging::Logger.
|
inline |
Get the stream for the INFO log level.
|
inline |
Log a message at the INFO level.
| ...Args | The argument types for the format string |
| fmt | The format string |
| ...args | The arguments for the format string |
|
inline |
Log a message at the specified log level using a format string to print the passed arguments.
| ...Args | The argument types for the format string |
| lvl | The log level for this message |
| fmt | The format string |
| ...args | The arguments for the format string |
|
pure virtual |
Log a message at the specified log level.
| lvl | The log level |
| message | The message to log |
Implemented in cli::logging::Logger.
|
pure virtual |
Remove all log handlers.
Implemented in cli::logging::Logger.
|
pure virtual |
Set the minimum log level for this logger.
| lvl | The new minimum log level |
Implemented in cli::logging::Logger.
|
inline |
Get the stream for the SUCCESS log level.
|
inline |
Log a message at the SUCCESS level.
| ...Args | The argument types for the format string |
| fmt | The format string |
| ...args | The arguments for the format string |
|
inline |
Get the stream for the TRACE log level.
|
inline |
Log a message at the TRACE level.
| ...Args | The argument types for the format string |
| fmt | The format string |
| ...args | The arguments for the format string |
|
inline |
Get the stream for the VERBOSE log level.
|
inline |
Log a message at the VERBOSE level.
| ...Args | The argument types for the format string |
| fmt | The format string |
| ...args | The arguments for the format string |
|
inline |
Get the stream for the WARNING log level.
|
inline |
Log a message at the WARNING level.
| ...Args | The argument types for the format string |
| fmt | The format string |
| ...args | The arguments for the format string |