log
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.
123456789101112131415from fastly_compute import LogEndpoint
# Direct usageendpoint = LogEndpoint.open("my_logs")endpoint.write("Hello from Fastly Compute!")
# Using Python standard loggingimport loggingfrom 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
| FastlyLogHandler | A logging handler that sends logs to a Fastly endpoint. |
| LogEndpoint | Interface to a Fastly logging endpoint. |