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

Builds a log event by allocating each field on a monotonic buffer and then sends it to the current logger. More...

#include <event.hpp>

Public Types

using resource_type = detail::monotonic_buffer_resource
 

Public Member Functions

template<class... Args>
 event_sender (logger *ptr, unsigned level, std::string_view component, const detail::source_location &loc, actor_id aid, std::string_view fmt, Args &&... args)
 
template<class T >
std::enable_if_t< std::is_integral_v< T >, event_sender && > field (std::string_view key, T value) &&
 Adds a boolean or integer field.
 
event_sender && field (std::string_view key, double value) &&
 Adds a floating point field.
 
event_sender && field (std::string_view key, std::string_view value) &&
 Adds a string field.
 
template<class Arg , class... Args>
event_sender && field (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_sender && >
 Adds nested fields.
 
void send () &&
 Seals the event and passes it to the logger.
 

Detailed Description

Builds a log event by allocating each field on a monotonic buffer and then sends it to the current logger.


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