Logging and monitoring mechanisms

IBM MobileFirst™ Platform Foundation reports errors, warnings, and informational messages into a log file. The underlying logging mechanism varies by application server.

IBM MobileFirst Platform Server

MobileFirst Server uses the standard java.util.logging package. By default, all MobileFirst logging goes into the application server log files. You can control MobileFirst Server logging by using the standard tools available in each application server. If, for example, you want to activate trace logging in Liberty, add a trace element to the server.xml file. To activate trace logging in WebSphere® Application Server, use the logging screen in the console and enable trace for MobileFirst logs. MobileFirst logs all begin with "com.worklight".

Application Center logs begin with "com.ibm.puremeap".

For information on sending logging information from packages outside of the MobileFirst package (com.worklight), see Adding additional logger packages.

For more information about the logging models of each server platform, including the location of the log files, see the documentation for the relevant platform, as shown in the following table.
Table 1. Documentation for different server platforms
Server platform Location of documentation
Apache Tomcat http://tomcat.apache.org/tomcat-7.0-doc/logging.html#Using_java.util.logging_(default)
WebSphere Application Server Version 7.0 http://ibm.biz/knowctr#SSEQTP_7.0.0/com.ibm.websphere.base.doc/info/aes/ae/ttrb_trcover.html
WebSphere Application Server Version 8.0 http://ibm.biz/knowctr#SSEQTP_8.0.0/com.ibm.websphere.base.doc/info/aes/ae/ttrb_trcover.html
WebSphere Application Server Version 8.5 full profile http://ibm.biz/knowctr#SSEQTP_8.5.5/com.ibm.websphere.base.doc/ae/ttrb_trcover.html
WebSphere Application Server Version 8.5 Liberty profile https://www.ibm.com/support/knowledgecenter/SSEQTP_8.5.5/com.ibm.websphere.wlp.doc/ae/rwlp_logging.html

Log level mappings

MobileFirst Server uses java util logging. The logging levels map to the following levels:

  • WL.Logger.debug: FINE
  • WL.Logger.info: INFO
  • WL.Logger.warn: WARNING
  • WL.Logger.error: SEVERE

Log monitoring tools

For Apache Tomcat, you can use IBM® Operations Analytics - Log Analysis or other industry standard log file monitoring tools to monitor logs and highlight errors and warnings.

For WebSphere Application Server, use the log viewing facilities that are described in the IBM Knowledge Center at the URLs that are listed in the table in the MobileFirst Server section.

Back-end connectivity

To enable trace to monitor back-end connectivity, see the documentation for your specific application server platform in the table in the MobileFirst Server section. The packages to be enabled for trace are com.worklight.adapters and com.worklight.integration. Set the log level to FINEST for each package.

Audit log for administration operations

MobileFirst Operations Console stores an audit log for login, logout, and for all administration operations, such as deploying apps or adapters or locking apps. The audit log can be disabled by setting the JNDI property ibm.worklight.admin.audit on the web application of the MobileFirst Administration service (worklightadmin.war) to false.

When the audit log is enabled, you can download it from MobileFirst Operations Console by clicking the Audit log link in the footer of the page.

Audit logs for adapters

To write log information for auditing adapter calls, activate the audit logs by setting audit="true" in your adapter.xml file in the procedure definition.

Login and authentication issues

To diagnose login and authentication issues, enable the package com.worklight.auth for trace and set the log level to FINEST.