Perforce server logging problem

When setting up a server it is often useful to enable one of the logging levels. The admin guide states that you need to do this:

  • p4 set P4DEBUG=server=2


which sets the server logging level to 2. You then need to restart the Perforce server.

However, if Perforce is running as a service (the default under Windows), then this does not work. The reason is that “p4 set” only sets the variable in for HKEY_CURRENT_USER in the Windows registry. However, when running as a service, p4d picks up its environment variables from HKEY_LOCAL_MACHINE. To do this you need to set the ‘-s’ flag. E.g.

  • p4 set -s P4DEBUG=server=2

Leave a Reply