---
title: log
summary: Low-level interface to Fastly's Real-Time Log Streaming endpoints.
url: https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/log/
---

**Kind:** Module  
**Package:** fastly 0.13.1  
**Path:** `fastly::log`

Low-level interface to Fastly's [Real-Time Log Streaming](https://docs.fastly.com/en/guides/about-fastlys-realtime-log-streaming-features) endpoints.

Most applications should use the high-level interface provided by
[`log-fastly`](https://docs.rs/log-fastly), which includes management of log levels and easier
formatting.

To write to an [`Endpoint`](https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/log/struct.Endpoint/), you can use any interface that works with [`std::io::Write`](https://doc.rust-lang.org/stable/core/io/write/trait.Write.html),
including [`write!()`](https://doc.rust-lang.org/stable/core/macro.write.html) and [`writeln!()`](https://doc.rust-lang.org/stable/core/macro.writeln.html).

Each write to the endpoint emits a single log line, so any newlines that are present in the
message are escaped to the character sequence `"\n"`.

## Structs

| Name | Summary |
| --- | --- |
| [Endpoint](https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/log/struct.Endpoint/) | A Fastly logging endpoint. |

## Enums

| Name | Summary |
| --- | --- |
| [LogError](https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/log/enum.LogError/) | Logging-related errors. |

## Functions

| Name | Summary |
| --- | --- |
| [set_panic_endpoint](https://www.fastly.com/documentation/reference/compute/sdks/rust/fastly/log/fn.set_panic_endpoint/) | Set the logging endpoint where the message from Rust panics will be written. |
