Access log in nginx-rtmp 0.9

The latest feature implemented in nginx-rtmp is access logging. It looks similar to nginx HTTP access logging. Similar to HTTP case the logger is on by default. If not changed explicitly RTMP access logger shares access log file with nginx HTTP engine.

rtmp {
    access_log logs/rtmp_access.log;
    server {
       ...
    }
}

Logging can be turned off:

access_log off;

RTMP access logger supports formatting with a number of predefined variables. The complete list of supported variables can be found on directives page in log_format directive description.

log_format new '$remote_addr $bytes_sent';
access_log logs/rtmp_access.log new;

Default format combined is supported as well. Here’s the definition of this format:

$remote_addr [$time_local] $command "$app" "$name" "$args" - 
$bytes_received $bytes_sent "$pageurl" "$flashver" ($session_readable_time)

Advertisements
  1. #1 by PilgrimX182 on January 16, 2013 - 6:59 am

    Thanks a lot!!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: