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>The debug level specified in the request request header.

T- Trace
D - Debug
I - Info
W - Warn
E - Error

<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.