Parse a structured log file and return log data.
p4 [g-opts] logparse [-e] [-T fields...] [-F filter] [-s offset] [-m max] logfile
The p4 logparse command parses the indicated
structured logfile and returns the log data in tagged format.
Structured logs differ from the basic error log (P4LOG) and audit log (P4AUDIT). To read the basic error
log, use the p4 logtail
command.
Valid names for structured log files:
|
|
All loggable events (commands, errors, audit, etc.) |
|
|
Audit events (audit, purge) |
|
|
Information about user login attempts. |
|
|
Command events (command start, command compute, command end) |
|
|
Error events (errors-failed, errors-fatal) |
|
|
Server events (startup, shutdown, checkpoint, journal rotation, etc.) |
ldapsync.csv
|
Activity of p4 ldapsync |
|
|
Major events that occur during replica integrity checking. |
|
|
Command tracking (track-usage, track-rpc, track-db) |
|
|
User events, with one record every time a user runs |
To enable structured logging, set the
serverlog.file. configurable(s) to the
name of the file. For example:n
$ p4 configure set serverlog.file.2=commands.csv
$ p4 configure set serverlog.file.3=errors.csv
$ p4 configure set serverlog.file.5=audit.csv
Numbers provided for the configurables do not have to be consecutive. A given number cannot exceed 500, so the following assignment returns an error:
$ p4 configure set serverlog.file.666=commands.csv
Structured log files are automatically rotated on checkpoint, journal
creation, overflow of associated
serverlog.maxmb. limit (if configured),
and the np4 logrotate
command.
|
|
Display special characters as hex-encodings. |
|
|
Limit output to records that match the filter pattern. |
|
|
Limit the number of lines returned. |
|
|
Start parsing at the given file offset as returned in the
|
|
|
Limit displayed fields to those listed. |
|
|
See Global Options. |
| Can File Arguments Use Revision Specifier? | Can File Arguments Use Revision Range? | Minimal Access Level Required |
|---|---|---|
|
N/A |
N/A |
|
|
To add entries to the log so that p4 logparse can find them, |