Skip to content

Logging

LoggingStep initializes the logger implementation of the foundation layer based on the policy data provided by the SettingsDownloadStep or the SettingsStoreStep.

Input Parameters

Mandatory input parameters:

  • policy – The policy data provided by SettingsDownloadStep or SettingsStoreStep.

  • context – Specifies the android context initiating the flow such as the caller Activity. This setting has to be provided on the initial FlowContext.

Optional input parameters:

  • builder – The ConfigurationBuilder of the logging implementation used by the foundation layer.

Using LoggingStep

  1. Initiate the step:

    1
      LoggingStep loggingStep = new LoggingStep();
    
  2. Specify the execute method's FlowActionHandler parameter's "onFailure" and "onSuccess" behaviour:

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
        flowManagerService.execute(flow, flowContext, new FlowActionHandler() {
                @Override
                public void onFailure(Throwable t) {
                    //set the status, update the caller activity
                }
    
                @Override
                public void onSuccess(FlowContext result) {
                    //set the status, update the caller activity
                    //read the result
                }
            });
    

Behaviour of LoggingStep

This step initializes the logging of the foundation layer. If the configuration builder was provided, then it is used for the initialization. Otherwise, a default configuration builder is used.

If the policy data enables the logging and its parameters are set, then the logging is initialized based on the policy data.