IBM Support

How to disable IBM FileNet P8 Content Engine (CE) server tracing completely and move both the error and trace logs output to another location.

Troubleshooting


Problem

Can I disable CE server traces completely and move both the error and trace log output to another location?

Symptom

Content Engine trace does not appear to turn off and the P8 server error log output location cannot be changed.

Cause

Disablement of P8 server tracing only prevents the logging of DEBUG messages for the marked subsystems. INFO, WARN, and ERROR messages are unconditionally logged to both the p8 trace and error logs. Which may give the appearance that P8 Server tracing is still enabled.

FileNet Enterprise Manager will only allow you to change the output location for the P8 server trace logs.

Environment

IBM FileNet Content Manager

Diagnosing The Problem

The P8 server trace is still being written to after disabling CE tracing.
The business requires the P8 server error log to be written to another location besides the default directory.

Resolving The Problem

Use the log4j configuration samples provided under the FileNet Content Engine installation directory. In Windows, these files are available at C:\Program Files\FileNet\ContentEngine\config\samples.

The steps required to enable and collect server trace files for support are as follows:

  1. Copy the sample log4j.xml.server to log4j.xml and if so desired, move the file to another location that will be referenced in the jvm argument that you will apply to the Content Engine application server.
  2. (JBoss ONLY) Please note that since JBoss systems use log4j by default, the following steps should be applied to the existing log4j.xml file located in <JBoss_install_root>/server/<server-name>/conf. Where <JBoss_install_root> is the location of the JBoss installation.
  3. Open the log4j.xml file and verify the output location and size of trace and error. Here are the settings to pay attention to for this
    <appender name="FileNetErrorAppender" class="org.apache.log4j.FileAppender">
    <param name="File" value="/p8_server_error.log"/>
    <param name="MaxFileSize" value="100MB"/>
    <param name="MaxBackupIndex" value="5"/>

    <appender name="FileNetTraceAppender" class="org.apache.log4j.FileAppender">
    <param name="File" value="/p8_server_trace.log"/>
    <param name="MaxFileSize" value="100MB"/>
    <param name="MaxBackupIndex" value="5"/>
    Change the path to the location where you want the files to be output to if you do not want the default location:

    Note: Ensure that the path exists and the Content Engine operating system user (the user account that runs the java process of the application server jvm hosting the content Engine) has read/write access to the location you want the logs to be written to.

    WebSphere - <install-root>/profiles/<profile-name>/FileNet/<server-name>/p8_server_trace.log
    WebLogic - <install-root>/user_projects/domains/<domain-name>/FileNet/<server-name>/p8_server_trace.log
    JBoss - <install-root>/bin/FileNet/<server-name>/p8_server_trace.log


    Windows example:

    <appender name="FileNetErrorAppender" class="org.apache.log4j.FileAppender">
    <param name="File" value="E:/P8Traces/p8_server_error.log"/>
    <layout class="org.apache.log4j.PatternLayout">
    <param name="ConversionPattern" value="%d %5p [%t] - %m\r\n"/>
    </layout>
    </appender>

    <appender name="FileNetTraceAppender" class="org.apache.log4j.FileAppender">
    <param name="File" value="E:/P8Traces/p8_server_trace.log"/>
    <!--
    # This is the layout that the TraceLoggingConfiguration framework uses. To use this layout
    # in a manual log4j configuration (while using skipTLC=true for example), jace.jar
    # must be present in the startup classpath.
    -->


    ...and further down some more lines to modify:


    <appender name="FileNetErrorRollingAppender" class="org.apache.log4j.RollingFileAppender">
    <param name="File" value="E:/P8Traces/p8_server_error.log"/>
    <param name="Threshold" value="error"/>
    <param name="MaxFileSize" value="100MB"/>
    <param name="MaxBackupIndex" value="5"/>
    <layout class="org.apache.log4j.PatternLayout">
    <param name="ConversionPattern" value="%d %5p [%t] - %m\r\n"/>
    </layout>
    </appender>

    <appender name="FileNetTraceRollingAppender" class="org.apache.log4j.RollingFileAppender">
    <param name="File" value="E:/P8Traces/p8_server_trace.log"/>
    <param name="MaxFileSize" value="100MB"/>
    <param name="MaxBackupIndex" value="5"/>
    <!--
    # This is the layout that the TraceLoggingConfiguration framework uses. To use this layout
    # in a manual log4j configuration (while using skipTLC=true for example), jace.jar
    # must be present in the startup classpath.

    -->





    Unix/Linux example:

    <appender name="FileNetErrorAppender" class="org.apache.log4j.FileAppender">
    <param name="File" value="/opt/IBM/P8Traces/p8_server_error.log"/>
    <layout class="org.apache.log4j.PatternLayout">
    <param name="ConversionPattern" value="%d %5p [%t] - %m\r\n"/>
    </layout>
    </appender>

    <appender name="FileNetTraceAppender" class="org.apache.log4j.FileAppender">
    <param name="File" value="/opt/IBM/P8Traces/p8_server_trace.log"/>
    <!--
    # This is the layout that the TraceLoggingConfiguration framework uses. To use this layout
    # in a manual log4j configuration (while using skipTLC=true for example), jace.jar
    # must be present in the startup classpath.
    -->


    ...and further down some more lines to modify:

    <appender name="FileNetErrorRollingAppender" class="org.apache.log4j.RollingFileAppender">
    <param name="File" value="/opt/IBM/P8Traces/p8_server_error.log"/>
    <param name="Threshold" value="error"/>
    <param name="MaxFileSize" value="100MB"/>
    <param name="MaxBackupIndex" value="5"/>
    <layout class="org.apache.log4j.PatternLayout">
    <param name="ConversionPattern" value="%d %5p [%t] - %m\r\n"/>
    </layout>
    </appender>

    <appender name="FileNetTraceRollingAppender" class="org.apache.log4j.RollingFileAppender">
    <param name="File" value="/opt/IBM/P8Traces/p8_server_trace.log"/>
    <param name="MaxFileSize" value="100MB"/>
    <param name="MaxBackupIndex" value="5"/>
    <!--
    # This is the layout that the TraceLoggingConfiguration framework uses. To use this layout
    # in a manual log4j configuration (while using skipTLC=true for example), jace.jar
    # must be present in the startup classpath.

    -->


    Also change the 'layout class' value - This is done in two places within the file:

    from:
    <!-- layout class="com.filenet.apiimpl.util.TraceLayout"/ -->
    <!-- Comment out the following if using the FileNet TraceLayout -->
    <layout class="org.apache.log4j.PatternLayout">
    <param name="ConversionPattern" value="%d %5p [%t] - %m\r\n"/>
    </layout>
    </appender>

    to:

    <layout class="com.filenet.apiimpl.util.TraceLayout"/>
    <!-- Comment out the following if using the FileNet TraceLayout -->
    <!-- layout class="org.apache.log4j.PatternLayout">
    <param name="ConversionPattern" value="%d %5p [%t] - %m\r\n"/>
    </layout -->
    </appender>



    Note: <!-- Comment out the following if using the FileNet TraceLayout -->
    This means the three lines for the layout class below the comment.

Add the following as JVM command line arguments to the application server:
  1. Example for Unix:-Dlog4j.configuration=file:/<absolute_path_for_log4j_file>/log4j.xml
  2. Example for Windows: -Dlog4j.configuration=file:/c:/log4j.xml on Unix -Dlog4j.configuration=file:/usr/home/log4j.xml
  3. Once the change is made, restart the web application server.

Note: -DskipTLC=true (Instructs the CE server to skip the existing trace logging configuration.)

Example for WebSphere: Application servers > CPEserver01 > Process definition > Java Virtual Machine


Check the Content Engine ping page to see if the jvm arguments took.



Note: Turn tracing off by removing the JVM command line arguments (and restarting the application server) and, if necessary, via FileNet Enterprise Manager or ACCE.


If you are following this procedure because all tracing was enabled through FileNet Enterprise Manager or ACCE and it can no longer be accessed do not enable any tracing in the log4j file.


Disable/enable P8 server trace so that the 'p8_server_trace.log' is not written out to:
  1. Edit the log4j.xml file as per above.
  2. See the example edits below to enable or disable

enabled:

# NOTE: These entries are used only if -DskipTLC=true has been specified as
# a JVM argument.
######################################################################## -->
<!-- By default, trace logging is turned off -->
<logger name="filenet_tracing">
<level value="off"/>

<!-- Disable FileNet TraceRollingAppender so it doe not write to p8_server_trace.log -->
<appender-ref ref="FileNetTraceRollingAppender"/>
</logger>

<!-- SubSystem: wsi -->
<!-- logger name="filenet_tracing.wsi">



To enable P8 Server tracing for sub components, enable <appender-ref ref="FileNetTraceRollingAppender"/> then enable the subSystem component you want to enable at the level you want to enable for troubleshooting.

Example: moderate summary

<!-- SubSystem: security -->
<logger name="filenet_tracing.security"> <level value="debug"/> </logger>
<!-- logger name="filenet_tracing.security.timer"> <level value="debug"/> </logger-->
<!-- ## Remove the comment corresponding to the desired detail level -->
<logger name="filenet_tracing.security.detail.moderate.summary"> <level value="debug"/> </logger>
<!-- logger name="filenet_tracing.security.detail.moderate"> <level value="debug"/> </logger -->
<!-- logger name="filenet_tracing.security.detail"> <level value="debug"/> </logger -->



disabled:

<!-- By default, trace logging is turned off -->
<logger name="filenet_tracing">
<level value="off"/>

<!-- Disable FileNet TraceRollingAppender so it does not write to p8_server_trace.log -->
<!-- appender-ref ref="FileNetTraceRollingAppender"/ -->
</logger>

<!-- SubSystem: wsi -->
<!-- logger name="filenet_tracing.wsi">


The above will disable all logging being written to the P8 server trace log.

Note: A recycle of the jvm hosting the Content Engine will be required to activate any changes to the settings.
[{"Product":{"code":"SSNW2F","label":"FileNet P8 Platform"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"--","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"4.5;5.0;5.1;5.2","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

More support for:
FileNet P8 Platform

Software version:
4.5, 5.0, 5.1, 5.2

Operating system(s):
AIX, HP-UX, Linux, Solaris, Windows

Document number:
248883

Modified date:
17 June 2018

UID

swg21682808