Endpoint

Classin logcompute-sdk-cpp 0.7.0View source

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

from_name

staticView source
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 stdout or stderr, which are reserved for debugging.

Parameters

name: std::string_view

Returns

fastly::expected<Endpoint>
std::string fastly::log::Endpoint::name()

Get the name of an Endpoint.

Returns

std::string