Structured logs

Structured logs record detailed operational and performance information in a machine-readable format, such as .csv or .json.

Compared to the standard log, structured logs:

  • Contain more detailed event data.

  • Are easier to process programmatically.

  • Support integration with reporting, monitoring, and observability platforms.

  • Can be analyzed using external tools and automation workflows.

Structured logs can be used to monitor user activity, server performance, authentication events, triggers, audits, errors, and other server operations. To learn more, see Using structured logging.

Starting in 2024.2, structured log data can also be exported using OpenTelemetry with the p4 logexport command.

For a server running in Unicode mode, all p4d error and information logs are written in UTF-8.

Use a UTF-8 compatible console or editor to display this log information correctly.

For information about configuring structured logs, managing log rotation, and understanding structured logging enhancements, see the topics in this section.