Endpoint
Include fastly/log.h to use this class.
A Fastly logging endpoint.
To write to this endpoint, use the <iostream> interface:
auto endpoint{fastly::log::Endpoint::from_name("my_log_endpoint")};endpoint << "stuff happened y'all";Methods
static fastly::expected<Endpoint> fastly::log::Endpoint::from_name(std::string_view name)Try to get an Endpoint by name.
Currently, the conditions on an endpoint name are:
- It must not be empty
- It must not contain newlines (
\n) or colons (:) - It must not be
stdoutorstderr, which are reserved for debugging.
Parameters
- name: std::string_view
Returns
fastly::expected<Endpoint>
name
View sourcestd::string fastly::log::Endpoint::name()Get the name of an Endpoint.
Returns
std::string