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 the access log file (wowzastreamingengine_access.log) for Wowza Streaming Engine 4.7.7 or later at a custom interval.
Notes:
- Installations of Wowza Streaming Engine 4.7.7 through 4.8.5 use the WowzaDailyRollingFileAppender property described in this article. Earlier versions of Wowza Streaming Engine used DailyRollingFileAppender, the default Log4j file appender property, resulting in a different file naming structure. Updating to Wowza Streaming Engine 4.7.7 preserves the previous naming structure. For information on changing the naming structure when you update, see Configure the Log4j file appender. For more information about Log4j 1.x, see the Apache Log4j 1.2 API reference documentation.
- For instructions on configuring log rolling for Wowza Streaming Engine 4.8.8.01 and later, see Configure Wowza Streaming Engine log rolling.
- For instructions on configuring log rolling for Wowza Streaming Engine 4.7.6 or earlier, see Configure Wowza Streaming Engine log rolling by time and size.
- Navigate to [install-dir]/conf/ and open log4j.properties in a text editor.
- Check to make sure that the first entry in the Access appender section is:
log4j.appender.serverAccess=org.apache.log4j.WowzaDailyRollingFileAppender
- In the Access appender section, update the DatePattern line with the interval you want log files to roll over. For example, to roll logs over at the top of every hour:
log4j.appender.serverAccess.DatePattern='.'yyyy-MM-dd-HH
The Access appender section of your log4j.properties file should now look like this:
# Access appender log4j.appender.serverAccess=org.apache.log4j.WowzaDailyRollingFileAppender log4j.appender.serverAccess.DatePattern='.'yyyy-MM-dd-HH 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
- Save your changes and restart Wowza Streaming Engine.