p4 logappend

Add a line to any user log files.

Syntax conventions

p4 [g-opts] logappend -a args...


The p4 logappend command appends a line to any structured log file that includes user log events. At least one argument is required, and up to 25 arguments may be supplied per line.

Use cases:

  • To enable custom or third party tools or scripts report status or error conditions into logs associated with the Helix server. See the Example below.

  • To insert a placeholder, observation, or question for later investigation. For example, "Slow server now. Is a large checkin being processed?"


-a args...

At least one argument is required, and up to 25 arguments to be appended to the user log. See the Example below.


See Global options.

Usage Notes

Can File Arguments Use Revision Specifier? Can File Arguments Use Revision Range? Minimal Access Level Required




  • The two log files that include user log events are user.csv and all.csv.


Suppose you have tool named mytool that interacts with Helix Core server to log errors centrally on the Helix server:

$ p4 -zprog=mytool logappend -a error "too many links" 123

Search the log by using the p4 logparse command:

$ p4 logparse -F 'f_prog=mytool f_args=links' user.csv

... f_eventtype 10
... f_timestamp 1511883486
... f_timestamp2 174298000
... f_date 2017/11/28 07:38:06 174298000
... f_pid 68580
... f_cmdno 1
... f_user bruno
... f_client bruno_ws
... f_func user-logappend
... f_host
... f_prog mytool
... f_version 2017.1.PREP-TEST_ONLY/DARWIN90X86_64/1505513
... f_args -a:error:too many links:123
... f_arg_1 error
... f_arg_2 too many links
... f_arg_3 123
... f_lognum 0
... f_logfile user.csv
... f_offset 1339