|
cpp-msgpack-rpc 0.2.0
An RPC library implementing MessagePack RPC.
|
Class to write logs. More...
#include <msgpack_rpc/logging/logger.h>
Public Member Functions | |
| Logger (std::shared_ptr< ILogSink > sink, LogLevel output_log_level) | |
| Constructor. | |
| LogLevel | output_log_level () const noexcept |
| Get the log level to write logs. | |
| template<typename Body> | |
| void | write (SourceLocationView location, LogLevel level, Body &&body) |
| Write a log. | |
| template<typename... Args> | |
| void | write (SourceLocationView location, LogLevel level, fmt::format_string< Args... > format, Args &&... args) |
| Write a log with formatting. | |
Static Public Member Functions | |
| static std::shared_ptr< Logger > | create (const config::LoggingConfig &config=config::LoggingConfig()) |
| Create a logger. | |
| static std::shared_ptr< Logger > | create (std::shared_ptr< ILogSink > sink, LogLevel output_log_level=LogLevel::INFO) |
| Create a logger. | |
Private Attributes | |
| LogLevel | output_log_level_ |
| Log level. | |
| std::shared_ptr< ILogSink > | sink_ |
| Log sink. | |
Class to write logs.
|
inlinestaticnodiscard |
Create a logger.
| [in] | config | Configuration of logging. |
|
inlinestaticnodiscard |
|
inlinenodiscardnoexcept |
|
inline |
|
inline |
|
private |
|
private |