Starting with version 11.2, PingFederate allows you to create custom logging categories. These categories allow you to track activities that are available but aren't logged by default.

  1. Open the <pf_install>/pingfederate/server/default/conf/log4j-categories.xml file and add a category entry.
    <category id="formAdapter" name="HTML Form Adapter" offLevel="INFO" onLevel="DEBUG" description="Enable debug logging for the PingFederate HTML Form adapter."/>
    Category entry parameters
    Parameter Description

    id

    The reference name for the logger.

    Must be a unique alphanumeric string.

    name

    The friendly name for the logger.

    The name will appear in the admin console, so it should be descriptive of the logger.

    offLevel

    The default level of logging and verbosity for when the category is disabled.

    Valid values are:

    • FATAL
    • ERROR
    • WARN
    • INFO (recommended)
    • DEBUG
    • TRACE

    For more information, see Log4j 2 logging service and configuration.

    onLevel

    The increased level of verbosity for when the category is active. Used to troubleshoot issues.

    Valid values are:

    • FATAL
    • ERROR
    • WARN
    • INFO
    • DEBUG(Recommended)
    • TRACE

    For more information, see Log4j 2 logging service and configuration.

    description

    A friendly description for the logger.

    The description will appear in the admin console.

  2. Save and close the log4j-categories.xml file.
  3. Open the <pf_install>/pingfederate/server/default/conf/log4j2.xml and, under the Loggers section, add a logger entry.
    <!-- Form Adapter logging -->
    <Logger name="com.pingidentity.adapters.htmlform.idp" level="${sys:pf.log.level.formAdapter:-INFO}"/>

    For the example logger entry sys:pf.log.level.formAdapter:-INFO, the syntax is as follows:

    sys:pf.log.level
    This is a constant value for all logger entries.
    formAdapter
    The id value from the category entry. Case sensitive.
    :-INFO
    The default starting logging level. Should match the offLevel value in the category entry.
  4. Save and close the log4j2.xml file.
  5. Copy both files to each PingFederate instance in the cluster that you want the settings to apply to.
  6. Restart PingFederate.