Helix Core is now P4. Product user interfaces will be updated soon. Learn more >>

P4 Server Administration Documentation | 2025.2

# Configure logging

Administrators of P4 Server often make use of log P4 Server supports the standard log, which is human-readable, as well as structured logs in a comma-separated value (CSV) format. The P4LOG environment variable specifies the log file for events, including errors. The human-readable P4AUDIT environment variable specifies the log file that records file transfers to users. Structured log files are typically processed by external tools. To learn more, see 'Logging" in P4 Server Administration Documentation. files, so configuring logging is an important task.

## Standard log file

The standard log file records events, and might include records of errors.

Use the `-L` flag to `p4d` or the `P4LOG` environment variable to specify the P4 Server the output file of the standard log.

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.

The P4 Server rejects commands when free space falls below certain limits. To learn more, see Monitor disk space usage.

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, P4 Server automatically creates a new log file in the original location.

To supplement your use of `P4LOG` and `P4AUDIT`, consider Structured logs and Using structured logging.

Your search for returned results