Configure logging
Administrators of P4 Server often make use of log Helix Core Server supports human-readable logs as well as structured logs in a comma-separated value (CSV) format. The human-readable P4LOG environment variable specifies the log file for errors. The human-readable P4AUDIT environment variable specifies the log file that records file transfers to users. Structured log files are for many purposes. To learn more, see 'Logging" in P4 Server Administration Documentation. files, so configuring logging is an important task.
Error log file
Use the -L
flag to p4d
or the P4LOG
environment variable to specify the P4 Server error output file. If no error output file is defined, errors are dumped to standard error of the p4d
process. Although
p4d
tries to ensure that all error messages reach the
user, if an error occurs and the user application disconnects before the
error is received, p4d
also logs these errors to its
error output.
P4 Server also supports trace flags used for debugging. To learn more, see Diagnostic flags for monitoring the server.
The rate of log file growth can be rapid, especially when verbose server logging is enabled. To learn about logging levels, see Using P4LOG.
Audit log file
If your site requires that user access to files be tracked, use the
-A
flag to p4d
or the environment
variable P4AUDIT
to activate auditing and specify the
audit
log file. When auditing is active, every time a user accesses a file, a
record is stored in the audit log file. This can consume
considerable disk space on an active installation. To learn more, see Auditing user file access.
Manage growth of log files
The log files defined by P4LOG
and P4AUDIT
continually grow.
To prevent those log files from growing so large that they cause problems, consider:
-
Writing a script (or a batch file) that automatically renames or moves the log file according to the criteria you choose. You can also rename or move the log manually.
-
Your organization's retention policies for storing historical copies of log files.
When the P4LOG
or P4AUDIT
log files are renamed or moved, Helix Core Server automatically creates a new log file in the original location.