Configuring Log Filters

improve this page | report issue

Overview

Administrators can control the MobileFirst client SDK log capture and levels from the MobileFirst Operations Console → [your application] → [version] → Log Filters.
Through Log Filters you can create a filter level that you can log at. The log level can be set globally (all logger instances) or for a specific package or packages.

Creating a log filter

For the application to fetch the configuration overrides that are set on the server, the updateConfigFromServer method must be called from a place in the code that is regularly run, such as in the app lifecycle callbacks.

Android

Logger.updateConfigFromServer();

iOS

[OCLogger updateConfigFromServer];

Cordova

WL.Logger.updateConfigFromServer();

Web

ibmmfpfanalytics.logger.updateConfigFromServer();

The Logger configuration values that the server returns take precedence over any values that are set on the client side. When the Client Log Profile is removed and the client tries to retrieve the Client Log Profile, the client receives an empty payload. In this case, the Logger configuration defaults to what was originally configured on the client.

Forwarding server logs

The MobileFirst Operations Console also gives the server administrator the ability to persist logs and send those logs to the MobileFirst Analytics Console.

To forward server logs, navigate to the Runtime Settings screen and specify the logger package under Additional Packages.
The collected logs can then be viewed in the Analytics Console. This is useful for a user to take advantage of triaging adapter logs in the Analytics Console without having to collect all server logs.

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.
Last modified on January 10, 2017