Setting logging and tracing for PMF Application Center on the application server
Overview
You can set logging and trace parameters for particular application servers and use JNDI properties to control output on all supported application servers.
You can set the logging levels and the output file for tracing operations for PMF Application Center in ways that are specific to particular application servers. In addition, Persistent Mobile Foundation provides Java™ Naming and Directory Interface (JNDI) properties to control the formatting and redirection of trace output, and to print generated SQL statements.
Jump to
- Enabling logging and tracing in WebSphere Application Server full profile
- Enabling logging and tracing in WebSphere Application Server Liberty
- Enabling logging and tracing in Apache Tomcat
- JNDI properties for controlling trace output
Enabling logging and tracing in WebSphere Application Server full profile
You can set the logging levels and the output file for tracing operations on the application server.
When you try to diagnose problems in the PMF Application Center (or other components of PMF), it is important to be able to see the log messages. To print readable log messages in log files, you must specify the applicable settings as Java™ virtual machine (JVM) properties.
- Open the WebSphere Application Server administrative console.
- Select Troubleshooting → Logs and Trace.
- In Logging and tracing, select the appropriate application server and then select Change log detail levels.
- Select the packages and their corresponding detail level. This example enables logging for PMF, including PMF Application Center, with level FINEST (equivalent to ALL).
com.ibm.puremeap.*=all
com.ibm.mfp.*=all
com.ibm.worklight.*=all
com.worklight.*=all
Where:
- com.ibm.puremeap.* is for PMF Application Center.
- com.ibm.mfp.*, com.ibm.worklight.* and com.worklight.* are for other PMF components.
The traces are sent to a file called trace.log, not to SystemOut.log or to SystemErr.log.
Enabling logging and tracing in WebSphere Application Server Liberty
You can set the logging levels and the output file for tracing operations for PMF Application Center on the Liberty application server.
When you try to diagnose problems in the PMF Application Center, it is important to be able to see the log messages. To print readable log messages in log files, you must specify the applicable settings.
To enable logging for PMF, including PMF Application Center, with level FINEST(equivalent to ALL), add a line to the server.xml file. For example:
<logging traceSpecification="com.ibm.puremeap.*=all:com.ibm.mfp.*=all:com.ibm.worklight.*=all:com.worklight.*=all"/>
In this example, multiple entries of a package and its logging level are separated by a colon (:).
The traces are sent to a file called trace.log, not to messages.log or to console.log.
Enabling logging and tracing in Apache Tomcat
You can set the logging levels and the output file for tracing operations undertaken on the Apache Tomcat application server.
When you try to diagnose problems in the PMF Application Center, it is important to be able to see the log messages. To print readable log messages in log files, you must specify the applicable settings.
To enable logging for PMF, including PMF Application Center, with level FINEST (equivalent to ALL), edit the conf/logging.properties file. For example, add lines similar to these lines:
com.ibm.puremeap.level = ALL
com.ibm.mfp.level = ALL
com.ibm.worklight.level = ALL
com.worklight.level = ALL
For more information, see Logging in Tomcat.
JNDI properties for controlling trace output
On all supported platforms, you can use Java™ Naming and Directory Interface (JNDI) properties to format and redirect trace output for PMF Application Center and to print generated SQL statements.
The following JNDI properties are applicable to the web application for PMF Application Center services (applicationcenter.war).
Property settings | Setting | Description |
---|---|---|
ibm.appcenter.logging.formatjson | true | By default, this property is set to false. Set it to true to format JSON output with blank spaces, for easier reading in log files. |
ibm.appcenter.logging.tosystemerror | true | By default, this property is set to false. Set it to true to print all log messages to system error in log files. Use the property to turn on logging globally. |
ibm.appcenter.openjpa.Log | DefaultLevel=WARN, Runtime=INFO, Tool=INFO, SQL=TR ACE | This setting prints all the generated SQL statements to the log files. |