Configure Wowza Streaming Engine log rolling

By default, the Wowza Streaming Engine™ media server software logs roll over daily if there's new activity. This article describes how to roll over wowzastreamingengine_access.log at a precise interval.

Notes:
  • New installations of Wowza Streaming Engine 4.7.7 and later use the WowzaDailyRollingFileAppender property, as described in this article.
  • Earlier versions used the default Log4j file appender property (DailyRollingFileAppender) resulting in a different file naming structure. Updating to Wowza Streaming Engine 4.7.7 will preserve the previous naming structure. If you'd like to change the naming structure, see Configure the Log4j file appender.
  • For more information about Log4j, see the Apache Log4j API reference documentation.
  1. Open the [install-dir]/conf/log4j.properties file in a text editor and ensure that the first entry in the Access appender section is:
     
    log4j.appender.serverAccess=org.apache.log4j.WowzaDailyRollingFileAppender
  2. In the Access appender section, update the date pattern in the following line to the specified time duration at which log files should roll over.

    For example, to change the DatePattern to enable rollover every minute:
     
    log4j.appender.serverAccess.DatePattern='.'yyyy-MM-dd

The Access appender section of your log4j.properties file should now look something like this:

# Access appender
log4j.appender.serverAccess=org.apache.log4j.WowzaDailyRollingFileAppender
log4j.appender.serverAccess.DatePattern='.'yyyy-MM-dd
log4j.appender.serverAccess.File=${com.wowza.wms.ConfigHome}/logs/wowzastreamingengine_access.log
log4j.appender.serverAccess.layout=com.wowza.wms.logging.ECLFPatternLayout
log4j.appender.serverAccess.layout.Fields=date,time,tz,x-event,x-category,x-severity,x-status,x-ctx,x-comment,x-vhost,x-app,x-appinst,x-duration,s-ip,s-port,s-uri,c-ip,c-proto,c-referrer,c-user-agent,c-client-id,cs-bytes,sc-bytes,x-stream-id,x-spos,cs-stream-bytes,sc-stream-bytes,x-sname,x-sname-query,x-file-name,x-file-ext,x-file-size,x-file-length,x-suri,x-suri-stem,x-suri-query,cs-uri-stem,cs-uri-query
log4j.appender.serverAccess.layout.OutputHeader=true
log4j.appender.serverAccess.layout.QuoteFields=false
log4j.appender.serverAccess.layout.Delimeter=tab
  1. Restart Wowza Streaming Engine.