C++ Actor Framework 1.0.0
Loading...
Searching...
No Matches
caf::log::event_fields_builder Class Reference

Builds list of user-defined fields for a log event. More...

#include <event.hpp>

Public Types

using list_type = detail::mbr_list<event::field>
 
using resource_type = detail::monotonic_buffer_resource
 

Public Member Functions

 event_fields_builder (resource_type *resource) noexcept
 
template<class T >
std::enable_if_t< std::is_integral_v< T >, event_fields_builder & > field (std::string_view key, T value)
 Adds a boolean or integer field.
 
event_fields_builderfield (std::string_view key, double value)
 Adds a floating point field.
 
event_fields_builderfield (std::string_view key, std::string_view value)
 Adds a string field.
 
template<class Arg , class... Args>
event_fields_builderfield (std::string_view key, std::string_view fmt, Arg &&arg, Args &&... args)
 Adds a formatted string field.
 
template<class SubFieldsInitializer >
auto field (std::string_view key, SubFieldsInitializer &&init) -> std::enable_if_t< std::is_same_v< decltype(init(std::declval< event_fields_builder & >())), void >, event_fields_builder & >
 Adds nested fields.
 
event::field_list build ()
 Seals the list and returns it.
 

Friends

class event
 

Detailed Description

Builds list of user-defined fields for a log event.


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