Search code examples
javaloggingibm-mobilefirstanalyticsmobilefirst-adapters

IBM Mobilefirst 7.1 analytics logging


I am using Mobilefirst 7.1 with Java adapters .I have read through the documentation for this version for operational analytics. The MFP sends the server generated logs automatically to analytics. I see there are client apis for analytics logging, namely WL.Analytics.log(). But I have to send my java.util.logger logs to MFP analytics console, then what is the configuration required? I have set my server configuration log level to INFO in server.xml and I have also put the jndi entry wl.analytics.logs.forward" to true. I see that the Mobilefirst generated INFO logs(com.worklight.common.util.HttpUtil) are sent to the analytics console. But the java.util logs are not sent. Please suggest how can I do that ?


Solution

  • By default only logging from package com.worklight is sent to analytics.

    If you want your adapter, which is in different package, will send logs to analytics, you should set wl.analytics.logs.packages in worklight.properties.

    Example:

    #Capture logs from user defined packages (by default logs captured only from "com.worklight" package)
    wl.analytics.logs.packages=my.package.com