log

Modulefastly-compute 0.1.3

fastly_compute::log

Logging API for Fastly Compute.

This module provides access to Fastly logging endpoints, allowing you to send logs to configured Real-Time Log Streaming endpoints.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from fastly_compute import LogEndpoint
# Direct usage
endpoint = LogEndpoint.open("my_logs")
endpoint.write("Hello from Fastly Compute!")
# Using Python standard logging
import logging
from fastly_compute import FastlyLogHandler
logger = logging.getLogger("my_app")
logger.setLevel(logging.INFO)
logger.addHandler(FastlyLogHandler("my_logs"))
logger.info("Request processed", extra={"user_id": 123})

Classes

FastlyLogHandlerA logging handler that sends logs to a Fastly endpoint.
LogEndpointInterface to a Fastly logging endpoint.