Log File Rotation
TASK
How do I keep my log file from getting too large?SOLUTION
The Perforce Server log file continually grows until it has rotated. The rate of log file growth can be rapid, particularly when verbose server logging is enabled. To limit the log file to a reasonable size, you can periodically rename it. The following sections provide information on handling of the Perforce Server log file based on server version.Server Versions 2003.1 and Later
As of server version 2003.1, the server no longer holds the log file open between updates. Use any standard batch file or script to move or rename the current log file -- a new log file will be created as needed.Server Versions 2002.2 and Earlier
Early versions of Perforce held the log file open between updates. You must stop the Perforce Server (or service, on Windows) before renaming, moving or deleting the log file.On UNIX, you can use a utility called cronolog to enable rotating the log on early server versions without the need to stop the server. This utility reads log file entries from standard input and selects an output file based on the current time. To use it, start P4D without the -L flag and pipe STDERR to cronolog. For example, in "sh" shell syntax:
p4d your_usual_args 2| cronologNotes:
Perforce does not support cronolog; use it at your own risk.
