JavaScript Logging details

Each event handler returns a corresponding response header. A response header is only returned when logging information is available for the event. The log header name starts with X-Akamai-EdgeWorker:

  • X-Akamai-EdgeWorker-onClientRequest-Log
  • X-Akamai-EdgeWorker-onOriginRequest-Log
  • X-Akamai-EdgeWorker-onClientResponse-Log
  • X-Akamai-EdgeWorker-onOriginResponse-Log
  • X-Akamai-EdgeWorker-responseProvider-Log

JavaScript Logging fields

EdgeWorkers JavaScript logging returns logs in the following format <debug-level>:<file>:<line> <message>.

JavaScript Logging fieldsDetailsDescription
<debug-level>:<file>:<line>:<message><debug-level>Currently the level is always "D" for debug.
<file>The URL encoded file name is only included if it is different from the previous log line.
<line>The line number where the log was executed.
<message>The URL encoded message. Includes values for any data included in the message.

A vertical bar (|) separates multiple messages.

  • All text in the string is ASCII. Invalid characters and delimiters are percent encoded.

  • A dollar sign appends text truncated by the byte limit.