Fastly offers logging to a number of formats and platforms. In addition to offering syslog streams, we offer logs shipped in various formats and to various hosted logging providers. We also provide information regarding logging in the Fastly Help Guides.

As always, if something does not work as expected or differs from the web
interface, please contact us right away via our Support Desk or IRC (#fastly on
Freenode, or webchat).

Authentication

Nearly all API calls require your request to be authenticated though a few do not.
You will use API tokens to authenticate your requests.
See our authentication page for more information.

API reference

The main entry point for the API is https://api.fastly.com/. For the sake of brevity, examples below omit this.

Authentication

Request Example

Response Example

HTTP/1.1200OKContent-Type:application/json

{"status":"ok"}

S3 Canary

Fastly will upload log messages to the S3 bucket, and in the format, specified in the S3 Canary object. This is a temporary controller to test a new S3 library and, as such, is part of a limited availability release. For more information, see our product and feature life cycle descriptions. If you would like to try it, please contact support@fastly.com.

Fields

field

type

description

access_key

string

Your S3 account access key.

bucket_name

string

The bucket name for S3 account.

created_at

string

Time-stamp (GMT) when the endpoint was created.

deleted_at

string

Time-stamp (GMT) when the endpoint was deleted.

domain

string

The domain of the Amazon S3 endpoint.

format

string

Apache style log formatting.

format_version

integer

The version of the custom logging format used for the configured endpoint. Can be either 1 (the default, version 1 log format) or 2 (the version 2 log format).

gzip_level

integer

What level of GZIP encoding to have when dumping logs (default 0, no compression).

message_type

string

How the message should be formatted One of:

classic

-

(default) RFC 3164 syslog prefix.

loggly

-

RFC 5424 structured syslog.

logplex

-

Heroku-style length prefixed syslog.

blank

-

No prefix. Useful for writing JSON and CSV.

name

string

The name of the s3 rule.

path

string

The path to upload logs to.

period

integer

How frequently the logs should be dumped (in seconds, default 3600).

placement

string

Where in the generated VCL the logging call should be placed.

redundancy

string

The S3 redundancy level.

response_condition

string

When to execute the s3. If empty, always execute.

secret_key

string

Your S3 account secret key.

server_side_encryption_kms_key_id

string

Optional server-side KMS Key Id. Must be set if server_side_encryption is set to aws:kms.

Request Example

Response Example

HTTP/1.1200OKContent-Type:application/json

{"status":"ok"}

Syslog legacy paths

Our original syslog logging endpoints did not include /logging/ as part of the URL pattern. In 2017 we updated the URLs to match the URL pattern of our newer logging endpoints. We maintain the deprecated patterns (without /logging/) as a courtesy.