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

P4 CLI Documentation | 2025.2

# p4 logschema

Describe the schema of structured log record types.

## Syntax

    p4 [g-opts] logschema [-A] -a
    p4 [g-opts] logschema [-A] recordtype

Syntax and naming conventions

## Description

This command returns a description of structured log record types in tagged format.

The output of p4 logschema -a returns the current version of the specification of all known log record types.

The output of p4 logschema recordtype returns the current version of the specification of the specified log record type.

The output of p4 logschema -A -a returns all versions of the specification of all known log record types.

The output of p4 logschema -A recordtype returns the specification of every version of the specified log record type.

See also:

- "Logging and structured log files" in P4 Server Administration Documentation, including the list of structured log file names at Enabling structured logging.
- the Perforce Knowledge Base article, Structured Server Logs.

## Options

Option | Description
--- | ---
`-a` | Display the current version of the specification of every known log record type.
`-A` | Display all versions of the specification of every know log record type.
recordtype | Display the current version of the specification for the specified log record type if used without -A. Display all version of the specification for the specified log record type if used with -A.
`g-opts` | See Global options.

## Usage notes

Can File Arguments Use Revision Specifier? | Can File Arguments Use Revision Range? | Minimal Access Level Required
--- | --- | ---
N/A | N/A | `super` available to an operator user

## Examples

`p4 logschema 0` | Display the tagged output for the CommandStart record type of the `commands.csv` log file.
p4 logschema -A 0 | Display all versions for the tagged output for the CommandStart record type, which includes both: version 0, which has fields 0 through 12 version 50, which has fields 0 through 14
`p4 logschema 2` | Display the tagged output for the CommandEnd record type of the `commands.csv` log file.
`p4 logschema 6` | Display the tagged output for the Audit record type of the audit.csv log file.

## Related commands

Parse a structured log file and return log data. | p4 logparse

Your search for returned results