Introduction
For all CDN services we provide detailed raw access logs downloadable via FTP, FTPS, SFTP and RSYNC. To enable raw logs you need to create a raw logs service and for that you need a CDN service and a logs storage.
Create a CDN service
Please refer to CDN Static, CDN HTTP Live, CDN Video or CDN Live for more details on how to create a CDN service.
Create a logs storage
Please refer to Creating, accessing and upgrading a logs storage for more details.
Creating a raw logs service
To create a raw logs service please visit the Reports/Logs page and fill in your desired CDN service and a logs storage and click the Create Log Service button.
Keep days
You can set a keep days parameter of your logs services. By default it is set to 31 days and it means that the service will keep your logs for the last 31 days. When it is set to 0 then the logs service will use all available logs storage space and then it will rotate your logs within this available space.
Format for static CDN services
The format for the CDN Static, CDN Static Push and CDN HTTP Live services is the Combined Log Format.
Example
1.2.3.4 - - [01/Jan/2025:12:00:00 -0100] "GET /image.jpeg HTTP/1.1" 200 2326 "https://http-referer.com/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0"
Format for streaming CDN services
The format for the CDN Video, CDN Video Push and CDN Live services is the following.
W2<TAB>service-identifier<TAB>x-severity<TAB>x-category<TAB>x-event<TAB>date<TAB>time<TAB>c-client-id<TAB> c-ip<TAB>c-port<TAB>cs-bytes<TAB>sc-bytes<TAB>x-duration<TAB>x-sname<TAB>x-stream-id<TAB> x-spos<TAB>sc-stream-bytes<TAB>cs-stream-bytes<TAB>x-file-size<TAB>x-file-length<TAB> x-ctx<TAB>x-comment<TAB>x-sname-query<TAB>W2
Example
W2<TAB>12345.r.cdnsun.net<TAB>INFO<TAB>stream<TAB>create<TAB>2025-01-01<TAB>12:00:00<TAB>556727814<TAB> 121.140.142.211<TAB>-<TAB>3465<TAB>3454<TAB>10.16<TAB>rtmp://mycompany.com:1935/_definst_/stream<TAB> 1<TAB>-<TAB>0<TAB>0<TAB>-<TAB>-<TAB>rtmp://mycompany.com:1935/_definst_/stream<TAB>-<TAB>-<TAB>W2
Notes
- Logs are collected every hour.
- The string W2 at the beginning and at the end of logs for streaming CDN services stands for the format version.
- Logs for streaming CDN services are generated for their Service Identifiers, e.g. 12345.r.cdnsun.net even if you access your CDN services via Service Domain, e.g. live.mycompany.com.
- If you are interested in real-time logs forwarding to your IP address please contact us.
What next?
Read about the following topics.