access_log

The access_log directive for the NGINX SRT Module configures the logging of SRT session events and statistics.

Syntaxaccess_log path [format | off];
Defaultnone
Context
Arguments1+

Description

The access_log directive allows users to specify one or more log file paths where SRT session logs will be written. Each specified path can include parameters that dictate the format of the log entries, among other options. This is helpful in tracking the details of SRT communications such as connections established, disconnections, errors, and other relevant statistics. This directive enhances the monitoring capabilities of the SRT server by providing insights into its operation and performance.

When using the access_log directive, users can specify the log format using either a predefined format or a custom format string. Commonly used fields in log formats may include the remote address, time, request method, and status codes. Users should ensure that log files are appropriately rotated or managed to prevent excessive disk usage. The logging mechanism follows the design principles of NGINX's core logging, thus maintaining high performance while writing log entries during active sessions.

Config Example

access_log /var/log/nginx/srt_access.log;

Ensure correct file permissions for the log directory to allow writing by the NGINX process.

Log file path must be accessible by the NGINX worker processes; otherwise, logging will fail.

Logs generated might consume significant disk space if not managed properly.

← Back to all directives