Working with log files



About log files

The server maintains several different types of logs. The server outputs statistics about client connections and stream activity to access logs. The server also maintains diagnostic logs and application logs for application activities.

access.XX.log
Tracks information about users accessing the server.

application.XX.log
Tracks information about activities in application instances.

diagnostic logs
Track information about server operations.
Note: In Adobe Flash Player 9 Update 3, Flash Player no longer notifies the server about pause events.

Configuration files for logging

Use the Server.xml and Logger.xml configuration files to configure logging. The Server.xml file contains a Logging section that controls logging behavior for the entire server. The Logging section includes an Enable tag that determines whether the server logs events. The Logging section also contains a Scope tag that determines whether the server writes separate log files for each virtual host or one file for the entire server. The location of each log file is determined by the Directory and FileName tags in the Logger.xml files.

If the Scope tag is set to server, the Logger.xml file in the RootInstall/conf folder determines the logging configuration for the whole server.

If the Scope tag is set to vhost, you can place Logger.xml files in virtual host root folders to control the behavior of each virtual host. If the Scope tag is set to vhost and a virtual host Logger.xml file doesn’t exist, the root Logger.xml file controls the logging behavior. If the Scope tag is set to server, virtual host Logger.xml files are ignored.

For more information, see comments in the Server.xml and Logger.xml files installed in the RootInstall/conf directory.

Working with web server log files

Flash Media Server installs with the Apache HTTP Server.

The default location of the Apache log files is RootInstall/Apache2.2/logs. The logs are in the default Apache error and combined access log formats. To change the location of the log files, edit the RootInstall/Apache2.2/conf/httpd.conf file.

The Apache logs are named access_log and error_log. Flash Media Server handles log rotation for the Apache logs.

For more information about Apache log files, see the Apache documentation at www.apache.org.

Rotating and backing up log files

Log files grow larger over time, but there are methods for managing log file size.

One option is to rotate log files, moving or deleting the oldest files. Use the rotation element in the Logger.xml file to specify a rotation schedule for log files. Two types of rotation schedules can be established. The first option is to set a daily rotation at a certain time. For example, setting daily at 00:00 rotates files every 24 hours at midnight. Alternatively, set a rotation that occurs when the log exceeds a specified length. Name, maximum file size in kilobytes, and maximum number of log files to keep can also be customized using the rotation element. For an example, see the Logger.xml file installed in the /conf directory.

Note: Log file rotation cannot be disabled. However, you can set values in the Logger.xml configuration files that effectively turn off rotation. Choose a large value for the MaxSize tag. Set the Schedule type to "duration" and choose a long maximum duration. For more information about the Logger.xml configuration files, see Configuration files for logging.

You can write an operating system script to delete or back up the log regularly. For important log files, move the log directory to a backup location. You can move the current active file; the server creates a new file on the next log event.

Verifying IPv6 in log files

IPv6 (Internet Protocol version 6) is a new version of the Internet Protocol that supports 128-bit addresses. To use IPv6, you need to activate IPv6 on the network interface card, enable Flash Media Server to listen on IPv6 sockets, and enclose numeric IPv6 addresses in URLs within brackets.

After following those steps, Flash Media Server (when it starts) logs available stack configuration, host name, and all available IP addresses for the host in the master.xx.log, edge.xx.log, and admin.xx.log files. The following x-comment fields from a sample edge log file indicate that the IPv6 stack and the IPv4 stack are available, and that the Flash Media Server host has dual addresses and is listening on both interfaces;

FMS detected IPv6 protocol stack! 
FMS config <NetworkingIPv6 enable=true> 
FMS running in IPv6 protocol stack mode! 
Host: fmsqewin2k3-02 IPv4: 10.133.192.42 IPv6: fe80::204:23ff:fe14:da1c%4 
Listener started ( _defaultRoot__? ) : 19350/v6 
Listener started ( _defaultRoot__? ) : 19350/v4 
Listener started ( _defaultRoot__? ) : 1935/v6 
Listener started ( _defaultRoot__? ) : 1935/v4
Note: In Red Hat Linux, the edge logs display only the highest IP version the socket listeners are using, even if the socket listeners accept connections over both IPv4 and IPv6. In the example above, in Linux, only the two /v6 entries would be displayed.

For more information about using IPv6, see Configuring IPv6.