IPLM Server logging

Describes where to find Perforce IPLM logs and what logs are available.

Perforce IPLM log locations

On Debian systems IPLM Server generates the following log files:

  • /var/log/mdx-piserver/piserver.log
  • /var/log/mdx-piserver/piserver-access.log
  • /var/log/mdx-piserver/piserver-error.log
  • /var/log/neo4j/debug.log
  • /var/log/neo4j/neo4j.log

On RHEL/CentOS/SLES systems the IPLM Server log files are:
  • /var/log/mdx-piserver/piserver.log
  • /var/log/mdx-piserver/piserver-access.log
  • /var/log/mdx-piserver/piserver-error.log
  • /var/log/mdx-neo4j/debug.log
  • /var/log/mdx-neo4j/neo4j.log

Logging changes in IPLM Core 2024.1

A new field logs messages in IPLM Server in IPLM Core 2024.1 to make tracking of actions easier. The default format of the log messages is:

logFormat: "%-5level [%date{ISO8601}] [%X{piRequestId:-none}] %logger: %message%n%rootException"

piRequestId is set when an API request is made to PiServer. By default, it is formatted iplm-<random_guid>, and is the same for all log events that originate with that API request. This can be used to filter logging for a particular action.

Events which are not originated from an API call have an id of none (assuming the above log4j configuration). This id is also passed to the Neo4J query log.

You can override the content of this tracking id by setting the Pi-Request-ID header in the HTTP request. The accepted value format is [a-zA-Z0-9_-]{1,64}.

Neo4j logging

The log files generated from Neo4j are managed by Neo4j and automatically rotated. The configurations can be changed in /usr/share/mdx/neo4j/current/conf/neo4j.conf (see the Neo4j operation manual for advanced configuration options.)

IPLM Server logging for versions prior to 2.34

The IPLM Server log files need to be handled by the host OS system. A typical approach is use the system logrotate utility. The following configuration example will rotate piserver.log 2 times before removing the log file. Log files are rotated only if they grow bigger than 10M.

IPLM Server Logging
/var/log/mdx-piserver/*.log {
rotate 2
copytruncate
size 10M
} 

IPLM Server logging for version 2.35 and later

IPLM Server log file rotation is off by default.  It is highly recommended to enable log file rotation for the PiServer or risk filling the /var partition. The piserver.yml configuration file was introduced in version 2.35 and contains entries for piserver-acces.log and for piserver.log however the entry requires modification to enable rotation

Using the system OS logrotate utility is optional. If logrotate or equivalent is the preferred log management tool, no change is required.

When editing the piserver.yml file, modify the existing sections and DO NOT add duplicate sections.

IPLM Server restart is required after modification of the piserver.yml file.

Use the following piserver.yml configurations for log file rotation:

The logging output becomes more verbose with each option.

  • WARN logs warning messages.

  • INFO logs info messages.

  • DEBUG logs messages helpful for debugging.

piserver.yml - piserver logging
logging:
  level: INFO
  appenders:
  - type: file
    currentLogFilename: /var/log/mdx-piserver/piserver.log
    archive: true
    archivedLogFilenamePattern: /var/log/mdx-piserver/piserver-%d.log
    archivedFileCount: 5