CDN Pro allows you to export logs that show requests made to a hostname. Before you export logs, you must specify the format of the logs by creating a log configuration for the hostname. Otherwise, no logs will be available for exporting.
To create a log configuration:


| Fields | Description |
|---|---|
| Description | Enter a description for the log configuration. |
| Hostnames | Enter a list of hostnames to which the log configuration applies. Separate multiple hostnames with a space or carriage return. A hostname can be:
|
| Days to Store Logs | Specify the number of days (from 1 to 30) that the logs will be stored. |
| Time Span of Log Files | Specify, in minutes, the time interval at which CDN Pro saves log files. |
| Log Format | Specify the format of the log entry. You can use the variables in the following section to create a custom format. If a variable value contains non-printable characters (ASCII characters <=0x1F or >=0x7F), double quotes, or backslash, these characters will be escaped to a format such as \xXX. For example, double quotes will become \x22 and a backslash will become \x5C. Note: A space is not escaped. To facilitate parsing, quote variables that may contain spaces. |
The following table shows the variables you can use in the Log Format field to customize the format of logs.
| Variable | Description |
|---|---|
| %apachet | Time in the Common Log Format, for example, 03/Apr/2023:07:49:03 +0000 |
| %cachestate | HIT, MISS, or REVALIDATE |
| %cltip | Client IP address |
| %cltisp | Client ISP |
| %cltport | Client port number |
| %cltregion | Client region |
| %content_code | Content code. Values can be set in Edge Logic by setting the $content_code variable |
| %cpu_ns | CPU time, in nanoseconds, for this request |
| %custom_1 | Refers to a custom log field with ID 1 you define using the custom_log_field directive |
| %custom_2 | Refers to a custom log field with ID 2 you define using the custom_log_field directive |
| %hostname | Host header |
| %method | HTTP method used to access the content (for example, GET) |
| %protocol | HTTP/1.0, HTTP/1.1, or HTTP2.0 |
| %querystr | Query string |
| %referer | Referer request header |
| %reqrange | Range header in requests from client |
| %reqhdrsize | Request header length |
| %reqsize | Request length (including request line, header, and request body) |
| %rmtuser | User name extracted from the Authorization header when basic authentication is used |
| %rspsize | HTTP response size, in bytes, including header and body, but not including TCP/IP/MAC |
| %rsptime | Response time in milliseconds |
| %samplerate | Number of requests corresponding to each log entry |
| %scheme | http or https |
| %statuscode | Response's status code (for example, 200) |
| %svrip | IP address of the CDN server handling the request |
| %svrnode | Cache server node name |
| %tcprtt | Round trip time, in microseconds, between server and client |
| %ua | User-agent header |
| %uniqueid | String uniquely identifying this request |
| %url | Full URL with query string, if any |
| %utctime | RFC 3339 timestamp of the response (for example, 2021-10-05T12:34:56Z) |
After you create a log configuration, use the following procedure to export logs:

Note: If no configurations match the specified hostname, a message asks whether you want to create a log configuration for the hostname.