• BlackBerry Dynamics
  • Runtime library for Android applications
  • 9.1.0.122
Runtime activity log

Introduction

The processing activity of the BlackBerry Dynamics runtime is logged, by the runtime itself. The contents of the activity log may be requested for diagnostic purposes, by the BlackBerry Dynamics technical support team. This is typically only necessary for complex support issues.

The activity log can be written to:

  • The console of the integrated development environment (IDE), also referred to as the adb console, accessed by the logcat command.
  • The BlackBerry Dynamics secure store on the device.

The log is only written to the console if detailed logging is allowed by policy.

The log consists of a sequence of messages about runtime activity. Log messages are divided into a number of categories in the activity logging system. These categories can be used to configure the activity log.

See also
System administration tasks links for how to change policy settings.

Log Message Categories

Each message in the activity logging system is assigned to one of the following categories.

Errors
Critical failures.
Warnings
Failures that arose but from which the runtime has recovered.
Info
Normal operational activity.
Detailed
Additional diagnostic information used for troubleshooting complex problems.

The activity logging system can be configured not to print some or all of its messages, based on the above categories. In the default configuration, messages in the Errors, Warnings, and Info categories are printed; messages in the Detailed category aren't printed.

Each logging location is configured differently and independently. The developer configures the console log and the enterprise administrator configures the container log.

Console Log Configuration

The console log is only printed if detailed logging is allowed by policy. The policy setting that controls detailed logging can be changed in the enterprise management console.

The categories of message that will be printed to the IDE console are configured in the settings object of the application. There are two ways to set the configuration.

Whichever way the configuration is set, changes to console logging are effective the next time the target is built and run. Changes to console logging have no affect on the container log.

Detailed Logging

To set a target's activity logging configuration to print all messages, including messages in the Detailed category:

  1. Open the assets/settings.json file of the application.
  2. Add a GDConsoleLogger array attribute to the settings object, or change the existing atrtribute as follows.
  3. Set the array to have a single string element "GDFilterNone"

Next time the target is built and run, the console will include all log messages.

The following snippet shows a settings object reflecting the above configuration. (The snippet also shows configuration of GDLibraryMode and the BlackBerry Dynamics entitlement identifier and version, which would be present in the assets/settings.json file but aren't related to activity logging.)

{
"GDLibraryMode": "GDEnterprise",
"GDApplicationID": "com.example.browser",
"GDApplicationVersion": "1.0.0.0",
"GDConsoleLogger": [ "GDFilterNone" ]
}

Selective Logging

To set a target's activity logging configuration to print a selection of message categories:

  1. Open the assets/settings.json file of the application.
  2. Add a GDConsoleLogger array attribute to the settings object, or change the existing atrtribute as follows.
  3. For each category that is to be excluded from the console log, add one of the following string values as an element of the array:
    • "GDFilterDetailed"
    • "GDFilterInfo"
    • "GDFilterWarnings"
    • "GDFilterErrors"
    • "GDFilterAll"

Next time the target is built and run, the console will include log messages that aren't in any of the listed categories.

Tip: Appending an underscore to a string in the above array attribute is an easily reversible way to remove the filter. To reinstate the filter, delete the underscore character.

The following snippet shows a settings object in which warnings and errors are printed and other messages are filtered out. The filters on warnings and errors have been disabled by appending an underscore as described above. (The snippet also shows configuration of GDLibraryMode and the BlackBerry Dynamics entitlement identifier and version, which would be present in the assets/settings.json file but aren't related to activity logging.)

{
"GDLibraryMode": "GDEnterprise",
"GDApplicationID": "com.example.browser",
"GDApplicationVersion": "1.0.0.0",
"GDConsoleLogger": [
"GDFilterErrors_",
"GDFilterWarnings_",
"GDFilterInfo",
"GDFilterDetailed"
]
}

Container Log Configuration

The categories of message that are printed to the container log file is configured in the BlackBerry Dynamics management console. Access to the management console is required to set this configuration. See the on-line help and other documentation for instructions.

Detailed category-by-category configuration is not available for the container log file.

Changes to container logging are effective immediately if the application is running and connected to the BlackBerry Dynamics proxy infrastructure. Otherwise, changes are effective as soon as the application does connect. Changes to container logging have no effect on the console log.

Note that the application can cause the container log to be uploaded. See the startUpload documentation.