cpp-msgpack-rpc 0.2.0
An RPC library implementing MessagePack RPC.
Loading...
Searching...
No Matches
msgpack_rpc::config::LoggingConfig Class Reference

Class of Logging configuration. More...

#include <msgpack_rpc/config/logging_config.h>

Collaboration diagram for msgpack_rpc::config::LoggingConfig:

Public Member Functions

 LoggingConfig ()
 Constructor.
std::string_view file_path () const noexcept
 Get the file path.
LoggingConfigfile_path (std::string_view value)
 Set the file path.
std::size_t max_file_size () const noexcept
 Get the maximum size of a file.
LoggingConfigmax_file_size (std::size_t value)
 Set the maximum size of a file.
std::size_t max_files () const noexcept
 Get the maximum number of files.
LoggingConfigmax_files (std::size_t value)
 Set the maximum number of files.
logging::LogLevel output_log_level () const noexcept
 Get the log level to write logs.
LoggingConfigoutput_log_level (logging::LogLevel value)
 Set the log level to write logs.

Private Attributes

std::string file_path_
 File path.
std::size_t max_file_size_
 Maximum size of a file.
std::size_t max_files_
 Maximum number of files.
logging::LogLevel output_log_level_
 Log level to write logs.

Detailed Description

Class of Logging configuration.

Definition at line 34 of file logging_config.h.

Constructor & Destructor Documentation

◆ LoggingConfig()

msgpack_rpc::config::LoggingConfig::LoggingConfig ( )

Constructor.

Definition at line 43 of file logging_config.cpp.

Member Function Documentation

◆ file_path() [1/2]

std::string_view msgpack_rpc::config::LoggingConfig::file_path ( ) const
nodiscardnoexcept

Get the file path.

Returns
File path.
Note
An empty string specifies that logs should be written to STDOUT.

Definition at line 88 of file logging_config.cpp.

◆ file_path() [2/2]

LoggingConfig & msgpack_rpc::config::LoggingConfig::file_path ( std::string_view value)

Set the file path.

Parameters
[in]valueValue.
Returns
This.
Note
Empty file path specifies output to console.

Definition at line 48 of file logging_config.cpp.

◆ max_file_size() [1/2]

std::size_t msgpack_rpc::config::LoggingConfig::max_file_size ( ) const
nodiscardnoexcept

Get the maximum size of a file.

Returns
Maximum size of a file.

Definition at line 92 of file logging_config.cpp.

◆ max_file_size() [2/2]

LoggingConfig & msgpack_rpc::config::LoggingConfig::max_file_size ( std::size_t value)

Set the maximum size of a file.

Parameters
[in]valueValue.
Returns
This.

Definition at line 53 of file logging_config.cpp.

◆ max_files() [1/2]

std::size_t msgpack_rpc::config::LoggingConfig::max_files ( ) const
nodiscardnoexcept

Get the maximum number of files.

Returns
Maximum number of files.

Definition at line 96 of file logging_config.cpp.

◆ max_files() [2/2]

LoggingConfig & msgpack_rpc::config::LoggingConfig::max_files ( std::size_t value)

Set the maximum number of files.

Parameters
[in]valueValue.
Returns
This.

Definition at line 62 of file logging_config.cpp.

◆ output_log_level() [1/2]

logging::LogLevel msgpack_rpc::config::LoggingConfig::output_log_level ( ) const
nodiscardnoexcept

Get the log level to write logs.

Returns
Log level to write logs.

Definition at line 98 of file logging_config.cpp.

◆ output_log_level() [2/2]

LoggingConfig & msgpack_rpc::config::LoggingConfig::output_log_level ( logging::LogLevel value)

Set the log level to write logs.

Parameters
[in]valueValue.
Returns
This.

Definition at line 71 of file logging_config.cpp.

Member Data Documentation

◆ file_path_

std::string msgpack_rpc::config::LoggingConfig::file_path_
private

File path.

Definition at line 107 of file logging_config.h.

◆ max_file_size_

std::size_t msgpack_rpc::config::LoggingConfig::max_file_size_
private

Maximum size of a file.

Definition at line 110 of file logging_config.h.

◆ max_files_

std::size_t msgpack_rpc::config::LoggingConfig::max_files_
private

Maximum number of files.

Definition at line 113 of file logging_config.h.

◆ output_log_level_

logging::LogLevel msgpack_rpc::config::LoggingConfig::output_log_level_
private

Log level to write logs.

Definition at line 116 of file logging_config.h.


The documentation for this class was generated from the following files: