Log custom parameters

You may want to enhance control over your log contents and delivery. In this section, you will learn how to enable logging custom content, include or exclude log lines over match criteria, and override log availability specified in the DataStream application.

You can use the Log Request Details behavior in your property configuration to include specific content in log lines generated by edge servers.

Using this behavior, you can control logging the value you set for the custom log field, what cookie information you want to log, and which of the following headers should be logged part of your logs:

  • User-Agent

  • Accept-Language

  • Cookie

  • Referer

  • Edge Server IP

  • X-Forwarded-For

Before you begin

Deactivate a stream associated with the property configuration that you want to update. See Deactivate a stream.

How to

  1. Use the top-right menu in the header to select the appropriate Control Center account with access to the applicable product.

  2. Access Property Manager configurations associated with the selected Control Center account. Go to > CDN > Properties (or just enter Properties in the search box).

    The Property Groups page opens.

  3. Click the name of your property.

  4. On the Property Details page, click the version of your configuration that you want to access.

    The Property Manager Editor appears.

  5. If your property is already active, click Edit New Version to introduce your changes.

  6. Select or create the rule where you want to enable the Log Request Details behavior:

    • To apply the behavior to all requests, add it in the Default Rule.

    • To apply the behavior to specific hostnames in the property or specific requests, add it in a custom rule.

  7. In the rule, add or edit the Log Request Details behavior.

  8. Enable the headers and specify the custom field that you want include in your streams:

  • Log Host Header. Specifies the domain name of the server for virtual hosting, and optionally the TCP port number on which the server is listening.

  • Log Referer Header. Contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify from where people are visiting.

  • Log User-Agent Header. Contains a distinctive string that allows the network protocol peers to identify the application type, operating system, software vendor, or software version of the requesting client.

  • Log Accept-Language Header. Advertises which languages the client is able to understand, and which locale variant is preferred.

  1. In Cookie Mode, choose which cookies you want to log:
  • Select Don't log any cookies to disable logging any cookies in your stream.

  • Select Log all cookies to enable logging all cookies in your stream

  • Select Log some cookies to specify which cookies to log in your stream. This option reveals the Cookies field where you can specify the cookie format that you can capture, either sessionid or user_local. You can also click the field and manually input the name of an applicable cookie format you want to use.

  1. Switch Include Custom Log Field to On. This option reveals the Custom Log Field where you can specify an additional data field to append to each log line.

    This field supports variables. See Variables in Property Manager. Note that the system shortens the value from the Custom Log Field to no more than 1000 bytes of data.

  2. Switch Log Akamai Edge Server IP Address to On to enable logging the IP address of the Akamai Edge server that served the request.

  3. Switch Log X-Forwarded-For to On to enable logging the original host requested by the client.

Next steps

Once you've made your changes, use Property Manager to activate your property in the production environment. See Activate your property in Property Manager.