trace_to

Functionin logcompute-sdk-cpp 0.7.0View source
template<typename... Args> void fastly::log::trace_to(std::string_view dest, std::format_string<Args...> fmt, Args &&...args)

Send a Trace-level message to a specified configured endpoint. Supports C++20 format strings.

Logging must be initialized in order for this to do anything. See init_simple() and LoggerBuilder for more information.

Example

Parameters

dest: std::string_view
fmt: std::format_string<Args...>
args: Args &&...

Returns

void
fastly::log::LoggerBuilder()
.default_endpoint("my_default_logs")
.endpoint("my_other_endpoint")
.init();
fastly::log::trace("Whoops");
fastly::log::trace_to("my_other_endpoint", "my name is {}", user->name());