error

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

Send an Error-level message to the configured default 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

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

Returns

void
fastly::log::init_simple("my_log_endpoint");
fastly::log::error("my name is {}", user->name());