Access logging

Where to find access logs and how to configure access log rotation

Access Log

Access logging is enabled by default and can be disabled by running:

$ confcli services.routing.settings.logging.accessLog false

Requests are logged in the Combined Log Format at: /var/log/acd-router/access.log. Additionally, the symbolic link /opt/edgeware/acd/router/log points to /var/log/acd-router, allowing the access logs to also be found at /opt/edgeware/acd/router/log/access.log.

Access Error Log

Access errors are logged to a separate file. These logs can be useful for troubleshooting. Requests are logged in the Combined Log Format, with the selected routing rules appended.

The access error log is disabled by default and can be enabled by running:

$ confcli services.routing.settings.logging.accessErrorLog true

The rule tree depth can be changed with:

$ confcli services.routing.settings.logging.accessErrorLogDepth 5

The error log is at: /var/log/acd-router/access-error.log. Additionally, the symbolic link /opt/edgeware/acd/router/log points to /var/log/acd-router, allowing the access logs to also be found at /opt/edgeware/acd/router/log/.

Example Output

$ cat /var/log/acd-router/access.log
May 29 07:20:00 router[52236]: ::1 - - [29/May/2023:07:20:00 +0000] "GET /vod/batman.m3u8 HTTP/1.1" 302 0 "-" "curl/7.61.1"

$ cat /var/log/acd-router/access-error.log
Jul 14 12:42:42 router[61136]: ::1 - - [14/Jul/2023:12:42:42 +0000] "GET /private/batman.m3u8 HTTP/1.1" 403 0 "-" "...  Safari/605.1.15" [verify_token.0.randis, verify_token.1.rejected]

Access Log Rotation

The access logs are rotated and compressed once the file reaches a size of 100 MB. By default, 10 rotated logs are stored before being rotated out. These rotation parameters can be reconfigured by editing the lines

size 100M
rotate 10

in /etc/logrotate.d/acd-router-access-log. For more log rotation configuration possibilites, refer to the Logrotate documentation.