cpp-msgpack-rpc 0.2.0
An RPC library implementing MessagePack RPC.
Loading...
Searching...
No Matches
parse_toml_logging.h File Reference

Definition of parse_toml functions for logging. More...

#include <cstddef>
#include <string>
#include <string_view>
#include <unordered_map>
#include <utility>
#include <toml++/toml.h>
#include "msgpack_rpc/config/logging_config.h"
#include "msgpack_rpc/config/toml/parse_toml_common.h"
#include "msgpack_rpc/logging/log_level.h"
Include dependency graph for parse_toml_logging.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  msgpack_rpc
 Namespace of cpp-msgpack-rpc library.
namespace  msgpack_rpc::config
 Namespace of configurations.

Functions

logging::LogLevel msgpack_rpc::config::toml::impl::parse_log_level (std::string_view str, const ::toml::source_region &source, std::string_view config_key)
 Parse a log level from a string.
void msgpack_rpc::config::toml::impl::parse_toml (const ::toml::table &table, LoggingConfig &config)
 Parse a configuration of logging from TOML.
void msgpack_rpc::config::toml::impl::parse_toml (const ::toml::table &table, std::unordered_map< std::string, LoggingConfig > &configs)
 Parse configurations of logging from TOML.

Detailed Description

Definition of parse_toml functions for logging.

Definition in file parse_toml_logging.h.

Function Documentation

◆ parse_log_level()

logging::LogLevel msgpack_rpc::config::toml::impl::parse_log_level ( std::string_view str,
const ::toml::source_region & source,
std::string_view config_key )
inlinenodiscard

Parse a log level from a string.

Parameters
[in]strString.
[in]sourceLocation in TOML. (For errors.)
[in]config_keyKey of the configuration.
Returns
Log level.

Definition at line 44 of file parse_toml_logging.h.

◆ parse_toml() [1/2]

void msgpack_rpc::config::toml::impl::parse_toml ( const ::toml::table & table,
LoggingConfig & config )
inline

Parse a configuration of logging from TOML.

Parameters
[in]tableTable in TOML.
[out]configConfiguration.

Definition at line 73 of file parse_toml_logging.h.

◆ parse_toml() [2/2]

void msgpack_rpc::config::toml::impl::parse_toml ( const ::toml::table & table,
std::unordered_map< std::string, LoggingConfig > & configs )
inline

Parse configurations of logging from TOML.

Parameters
[in]tableTable in TOML.
[out]configsConfigurations.

Definition at line 100 of file parse_toml_logging.h.