---
title: Endpoint
summary: A Fastly logging endpoint.
url: https://www.fastly.com/documentation/reference/compute/sdks/cpp/fastly/log/class.Endpoint/
---

**Kind:** Class  
**Module:** [log](https://www.fastly.com/documentation/reference/compute/sdks/cpp/fastly/log/)  
**Package:** compute-sdk-cpp 0.7.0  
**Source:** https://github.com/fastly/compute-sdk-cpp/blob/ff911e47be2f319e83a9cde960d2c3c5db534280/include/fastly/log.h#L425

Include `fastly/log.h` to use this class.

A Fastly logging endpoint.

To write to this endpoint, use the `<iostream>` interface:

```cpp
auto endpoint{fastly::log::Endpoint::from_name("my_log_endpoint")};
endpoint << "stuff happened y'all";
```

## Methods

### from_name

**Flags:** static  
**Source:** https://github.com/fastly/compute-sdk-cpp/blob/ff911e47be2f319e83a9cde960d2c3c5db534280/include/fastly/log.h#L443

```cpp
static fastly::expected<Endpoint> fastly::log::Endpoint::from_name(std::string_view name)
```

Try to get an [`Endpoint`](https://www.fastly.com/documentation/reference/compute/sdks/cpp/fastly/log/class.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>`

### name

**Source:** https://github.com/fastly/compute-sdk-cpp/blob/ff911e47be2f319e83a9cde960d2c3c5db534280/include/fastly/log.h#L431

```cpp
std::string fastly::log::Endpoint::name()
```

Get the name of an [`Endpoint`](https://www.fastly.com/documentation/reference/compute/sdks/cpp/fastly/log/class.Endpoint/).

**Returns**

`std::string`
