Skip to content

Logging

Tony Shearer edited this page Nov 14, 2013 · 2 revisions

CDN Selector generates 2 types of logs:

  • Operations Log
  • Request Log

##Operations Log All operational logging is sent to the console (stdout).

This log file should be monitored for any error conditions, and is the first port of call for troubleshooting. The format of the log is:

<timestamp> - <loglevel>: <message>

  • is an ISO8601 compliant timestamp
  • is one of: debug, info, warn, or error depending on the severity of the message
  • is a human readable message.

##Request Log The request log records information about every request served by the cdns-fronend application. Its log format is based on W3C logging conventions.

A new request log is generated every hour by the application (configurable). Log file names are unique, and once created they are never renamed by the application.

The fields in the log are:

date time c-ip s-dns x-proto s-parser cs-resource 
s-resource sc-response-code sc-response x-preferred-cdn x-cdn 
x-location cs-user-agent s-ip c-port 
Field Name Type Description
date unquotedstring The date this log/event entry was recorded (Format: YYYY-MM-DD)
time unquotedstring The time this log/event entry was recorded (Format: hh:mm:ss[.s])
c-ip unquotedstring The IP address of the client
s-dns unquotedstring Administrative DNS name of the server.
x-proto quotablestring The protocol the client used to connect to the CDN Selector. One of: dns, http, rtmp
s-parser quotablestring The CDN Selector parser used to process the request. E.g. HttpServer
cs-resource quotablestring A representation of the client's request for a resource. E.g. http://demo.cdnexperts.net/path/to/content
s-resource quotablestring The internal representation of the resource the client is requesting. This will be the name of the CDN that is selected to serve the request. E.g. Velocix
sc-response-code quotablestring The response/status code returned by the CDN Selector to the client.
sc-response quotablestring A representation of the response returned by the CDN Selector. E.g. http://66c31a5db47d96799134-07d0dcfc87cc7f17a619f7b9e538157a.r2.cf3.rackcdn.com/demo/dtcp-sprint5/vxlive/index.m3u8
x-preferred-cdn quotablestring The first choice CDN for delivery, based on the client’s IP address. E.g.Velocix
x-cdn quotablestring The actual CDN that was used for delivery. This may differ from the x-preferred-cdn in the event that the first choice CDN is unavailable or unable to service the request. E.g. Akamai
x-location quotablestring The location of the surrogate selected for delivery on the chosen CDN, if known. Currently this is only supported for Velocix. The location is expressed in G2 format.
cs-user-agent quotablestring User-Agent string included in the request.
s-ip unquotedstring IP address of the server that the client connected to.
c-port number UDP/TCP port of end-user

Note that the application will never remove a log file - you must put in place a mechanism to clean up.