Basics
- About the web interface controls
- Always-on DDoS mitigation
- Browser recommendations when using the Fastly web interface
- Content and its delivery
- Fastly POP locations
- Getting started with Fastly
- How caching and CDNs work
- How Fastly's CDN Service works
- HTTP status codes cached by default
- Self-provisioned Fastly services
- Sign up and create your first service
- Working with services
Domains & Origins
Performance
Basics
Dictionaries
Domains & Origins
- Changing origins based on user location
- Connecting to origins
- Enabling global POPs
- Failover configuration
- IPv6 support
- Maintaining separate HTTP and HTTPS requests to origin servers
- Routing assets to different origins
- Setting up redundant origin servers
- Specifying an override host
- Using Fastly with apex domains
Request settings
Cache settings
Headers
Responses
Performance
- About Dynamic Servers
- Cache control tutorial
- Caching configuration best practices
- Controlling caching
- Creating and using pools with Dynamic Servers
- Creating and using server entries with Dynamic Servers
- Enabling API caching
- Enabling automatic gzipping
- Failure modes with large files
- HTTP/2 server push
- Implementing API cache control
- Making query strings agnostic
- Request collapsing
- Segmented Caching
- Serving stale content
- Setting Surrogate-Key headers based on a URL
- Setting Surrogate-Key headers for Amazon S3 origins
- Streaming Miss
Purging
Custom VCL
- Accept-Language header VCL features
- Authenticating before returning a request
- Basic authentication
- Creating location-based tagging
- Custom responses that don't hit origin servers
- Delivering different content to different devices
- Enabling URL token validation
- Guide to VCL
- Isolating header values without regular expressions
- Manipulating the cache key
- IP geolocation variables: Migrating to the new dataset
- Overriding which IP address the geolocation features use
- Response Cookie handling
- Support for the Edge-Control header
- Understanding the different PASS action behaviors
- Using edge side includes (ESI)
- VCL regular expression cheat sheet
Image optimization
Video
Access Control Lists
Monitoring and testing
Securing communications
Security measures
TLS
- Domain validation for TLS certificates
- Enabling HSTS through Fastly
- Forcing a TLS redirect
- Managing domains on TLS certificates
- Serving HTTPS traffic using certificates you manage
- Serving HTTPS traffic using Fastly-managed certificates
- Setting up free TLS
- TLS key and certificate replacement
- TLS termination
Web Application Firewall
Logging endpoints
- Log streaming: Amazon S3
- Log streaming: Microsoft Azure Blob Storage
- Log streaming: Cloud Files
- Log streaming: Datadog
- Log streaming: DigitalOcean Spaces
- Log streaming: Elasticsearch
- Log streaming: FTP
- Log streaming: Google BigQuery
- Log streaming: Google Cloud Storage
- Log streaming: Honeycomb
- Log streaming: Kafka
- Log streaming: Log Shuttle
- Log streaming: LogDNA
- Log streaming: Logentries
- Log streaming: Loggly
- Log streaming: Heroku's Logplex
- Log streaming: OpenStack
- Log streaming: Papertrail
- Log streaming: Scalyr
- Log streaming: SFTP
- Log streaming: Splunk
- Log streaming: Sumo Logic
- Log streaming: Syslog
Non-Fastly services
Streaming logs
Debugging techniques
Common errors
Account management
Billing
User access and control
Changing where log files are written
Last updated October 23, 2019
For supported logging endpoints that write files to remote services, Fastly uses a combination of factors to ensure log files aren't overwritten, including:
- Using the file creation timestamp.
- Generating a unique ID.
- If a file with the same timestamp and UID combination exists, incrementing a counter and adding that to the end of the filename.
To change where log files are written, you can modify the path
and timestamp_format
variables on select endpoints. The logging system combines the path
, timestamp_format
, and uid
variables to create the file name:
<path><timestamp>-<uid>.log<suffixes>
This guide explains how to use the path
and timestamp_format
variables to control where log files are written.
Timestamp format
You may want to consider changing the timestamp format to remove characters from the log filenames. For example, if you're working with Elastic MapReduce, you might need to remove the colons in the filename.
The timestamp_format
variable is provided as a strftime compatible format. The default format is ISO 8601 Combined Date/Time Format:
%Y-%m-%dT%H:%M:%S.000
The variables are expanded when the file is created. For example, %Y
will be replaced by the current year and %m
by the current month number:
<year>-<2 digit month number>-<2 digit day number>T<hour>:<minute>:<second>
The timestamp for a file created at midnight on January 1st, 1970 would be 1970-01-01T00:00:00.000
.
Path
The path
variable acts differently depending on whether or not it ends in a trailing /
.
If the variable does end in a trailing /
, then it's treated as a directory. For example, if the variable is set to my_logs/
, the files are written in the directory my_logs
. If the variable is set to my_logs
without the trailing /
, the files are written in the top-level directory and are prefixed with my_logs
.
The two approaches can also be combined. For example, if the variable is set to my_logs/foo
, the files are written in the my_logs
directory and are prefixed with foo
.
Logs can also be nested. For example, if the variable is set to my_logs/sub_logs/
, the files are written in the sub_logs
directory in the my_logs
directory.
TIP: The path can also be a strftime
compatible string. For example, if the variable is set to %Y/%m/%d
, the files are written to a directory based on the year, month, and date.
Directories are created automatically when possible.
Suffixes
Fastly's logging system automatically adds suffixes to files as appropriate.
Suffix | File type |
---|---|
.log | Plain log file |
.log.gz | Gzipped log file |
.log.gpg | PGP encrypted log file |
.log.gz.gpg | PGP encrypted, Gzipped log file |