Setting logging and tracing for Application Center on the application server
improve this page | report issueOverview
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 Application Center in ways that are specific to particular application servers. In addition, IBM 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 Application Center (or other components of Mobile Foundation), 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 Mobile Foundation, including 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 Application Center.
- com.ibm.mfp.*, com.ibm.worklight.* and com.worklight.* are for other MobileFirst 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 Application Center on the Liberty application server.
When you try to diagnose problems in the 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 Mobile Foundation, including 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.
For more information, see Liberty profile: Logging and Trace.
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 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 Mobile Foundation, including 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 Application Center and to print generated SQL statements.
The following JNDI properties are applicable to the web application for 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. |
Inclusive terminology note: The Mobile First Platform team is making changes to support the IBM® initiative to replace racially biased and other discriminatory language in our code and content with more inclusive language. While IBM values the use of inclusive language, terms that are outside of IBM's direct influence are sometimes required for the sake of maintaining user understanding. As other industry leaders join IBM in embracing the use of inclusive language, IBM will continue to update the documentation to reflect those changes.