Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
fc::gelf_appender::impl Class Reference
Collaboration diagram for fc::gelf_appender::impl:

Public Member Functions

 impl (const variant &c)
 
 ~impl ()
 

Public Attributes

config cfg
 
std::optional< boost::asio::ip::udp::endpoint > gelf_endpoint
 
udp_socket gelf_socket
 

Detailed Description

Definition at line 42 of file gelf_appender.cpp.

Constructor & Destructor Documentation

◆ impl()

fc::gelf_appender::impl::impl ( const variant & c)
inline

Definition at line 49 of file gelf_appender.cpp.

50 {
51 mutable_variant_object mvo;
52 from_variant(c, mvo);
53
54 cfg.endpoint = mvo["endpoint"].as<std::string>();
55 mvo.erase("endpoint");
56 cfg.host = mvo["host"].as<std::string>();
57 mvo.erase("host");
58 cfg.user_fields = mvo;
59
60 for(auto&& field_name : config::reserved_field_names) {
61 if (cfg.user_fields.contains(field_name.c_str())) {
62 FC_THROW_EXCEPTION(invalid_arg_exception, "Field name '${field_name}' is reserved",
63 ("field_name", field_name));
64 }
65 }
66 for(auto&& field : cfg.user_fields) {
67 if (!std::regex_match(field.key(), config::user_field_name_pattern)) {
68 FC_THROW_EXCEPTION(invalid_arg_exception, "Field name '${field_name} must begin with an underscore and contain only letters, numbers, underscores, dashes, and dots.",
69 ("field_name", field.key()));
70 }
71 }
72 }
bool contains(const char *key) const
#define FC_THROW_EXCEPTION(EXCEPTION, FORMAT,...)
ehm field
void from_variant(const fc::variant &v, sysio::chain::chain_id_type &cid)
string field_name
Definition abi_def.hpp:8
Here is the call graph for this function:

◆ ~impl()

fc::gelf_appender::impl::~impl ( )
inline

Definition at line 74 of file gelf_appender.cpp.

75 {
76 }

Member Data Documentation

◆ cfg

config fc::gelf_appender::impl::cfg

Definition at line 45 of file gelf_appender.cpp.

◆ gelf_endpoint

std::optional<boost::asio::ip::udp::endpoint> fc::gelf_appender::impl::gelf_endpoint

Definition at line 46 of file gelf_appender.cpp.

◆ gelf_socket

udp_socket fc::gelf_appender::impl::gelf_socket

Definition at line 47 of file gelf_appender.cpp.


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