Android SDK - Logging Utility

The com.paydiant.android.common.util.PaydiantLoggingUtility utility class exposes the functionality that allows the app to inform the Paydiant platform of its activity based on key event triggers, such as payment, logout, data retrieval, etc. This logging information is critical to providing accurate and efficient technical support and troubleshooting.

As of SDK version 4.6, the Paydiant Logging Utility automatically logs all events that pass through the mobile gateway, so the developer does not need to specifically configure events and event parameters to be logged or determine when the logs should be submitted.

Note: When internal event logging is enabled, developers must configure failure events with corresponding error messages, since the such messages are not known to the SDK.

Developers have the option of disabling this internal logging feature in favor of defining a custom approach to log messages for each SDK event. The Android SDK also supports a hybrid approach to SDK event logging, in which custom logging can be used in conjunction with internal logging in order to provide additional information. This chapter discusses the methods that are exposed in the SDK that allow developers to leverage Paydiant’s internal logging as well as the custom logging mechanisms to ensure that the most useful information is captured for efficient and effective technical support and troubleshooting.

Alternatively, developers can bypass the Paydiant Logging Utility entirely and implement a logging utility that is more specifically tailored to the business logic required by the issuer. Refer to the Custom Logging Utility, for details about the SDK methods and logging format specification required to initialize an alternative logging utility class.

Note: Paydiant strongly encourages developers to use its provided Logging Utility, except in cases where critical logging requirements are not met by Paydiant’s implementation.

Using the Paydiant Logging Utility

The com.paydiant.android.common.util.PaydiantLoggingUtility class uses the com.paydiant.android.ui.service.logging.PaydiantLoggingService class to submit log entries.

To add the functionality of provided by the Paydiant Logging Utility, add the PaydiantLoggingService class as a service to the AndroidManifest.xml.

< ?xml version="1.0" encoding="utf-8"? >
< manifest xmlns:android="http://schemas.android.com/apk/res/android" ... >
...
< application ... >
...
< service android:name = "com.paydiant.android.ui.service.logging.PaydiantLoggingService" / >
...
< /application >
< /manifest >

As of SDK 5.10, the app no longer needs to initialize the loggin utility explicitly. If the service is included in the AndroidManifest, the SDK will automatically initialize the class.

Setting Error Display Messages for Internally Logged Events

During a failure event (such as an exception thrown during a payment), the error message displayed to the wallet owner must be set within the failure logging message for internally logged events. Otherwise, the SDK will have no means of connecting the failure event to the displayed error and, should the user contact tech support and describe the behavior in the app, the logs will have no record of the error message that the user describes, making troubleshooting very difficult.

Paydiant exposes an Add Failed Event Log Message method in the PaydiantLoggingUtility to pass the error display message in the failure logging entry. Invoke this call immediately upon a failure event (even before actually displaying the error message) because certain events (such as payment and login failures) are configured to submit the logging entry immediately upon occurrence and any delays in setting the error message may result in its omission from the logged entry.

Disable Internal Logging for Select Events

To implement custom logging for individual events, but keep internal logging for other events, set setCustomLoggingEnabled=TRUE immediately prior to calling the relevant event’s SDK method, then set setCustomLoggingEnabled=FALSE after handling the success and failure callbacks for the method.

Logging Event Types

The Paydiant Logging Utility automatically creates log entry messages for the event types defined in the com.paydiant.android.core.enums.PaydiantLoggingEventType enum class.

The following table provides the list of default event types, which developers can reference for use when providing custom logging implementations.

Some events take parameters that must be populated with values returned by the server upon event completion. Events for which parameter values are required list the required parameters in the description and each parameter is a hyperlink to its definition in Table 6.

Logging utility event types

Event Description
LOGIN_SUCCESS User authentication and login succeeded.
LOGIN_FAILED User authentication and login failed.
LOGOFF_SUCCESS User logout succeeded.
LOGOFF_FAIL User logout failed.
SCAN_SUCCESS The app successfully captured the token. Provide the token value as the SCAN_EVENT_TOKEN event parameter.
SCAN_FAIL The app failed to capture the token.
TX_INFO_RETRIEVE_SUCCESS The app successfully retrieved the transaction information for a token. Populate the following event parameters with the returned values:
TRANSACTION_EVENT_TX_TYPE
TRANSACTION_EVENT_REF_ID
TRANSACTION_EVENT_MERCHANT_NAME
TRANSACTION_EVENT_STORE_LOCATION_NAME
TX_INFO_RETRIEVE_FAIL The transaction information was not retrieved.
PAYMENT_SUCCESS The app successfully completed a payment transaction. Populate the following event parameters with the returned values:
TRANSACTION_EVENT_REF_ID
TRANSACTION_EVENT_PAYMENT_TOTAL
PAYMENT_FAIL The payment transaction failed.
CASH_ACCESS_SUCCESS The app successfully completed a cash access transaction. Populate the following event parameters with the returned values:
TRANSACTION_EVENT_REF_ID
TRANSACTION_EVENT_PAYMENT_TOTAL
CASH_ACCESS_FAIL The cash access transaction failed.
REFUND_SUCCESS The app successfully completed a refund transaction. Populate the following event parameters with the returned values:
TRANSACTION_EVENT_REF_ID
TRANSACTION_EVENT_PAYMENT_TOTAL
REFUND_FAIL
PAYMENT_CANCEL_SUCCESS The app successfully cancelled the payment transaction. Populate the following event parameter with the returned value:
TRANSACTION_EVENT_REF_ID
PAYMENT_CANCEL_FAIL The payment cancellation failed.
CASH_ACCESS_CANCEL_SUCCESS The app successfully cancelled the cash access transaction. Populate the following event parameter with the returned value:
TRANSACTION_EVENT_REF_ID
CASH_ACCESS_CANCEL_FAIL
REFUND_CANCEL_SUCCESS The app successfully cancelled the refund transaction. Populate the following event parameter with the returned value:
TRANSACTION_EVENT_REF_ID
REFUND_CANCEL_FAIL The refund cancellation failed.
ACCOUNTS_RETRIEVE_SUCCESS The app successfully retrieved the payment accounts.
ACCOUNTS_RETRIEVE_FAIL The payment accounts could not be retrieved.
ACCOUNTS_REFRESH_SUCCESS The app successfully refreshed all payment accounts.
ACCOUNTS_REFRESH_FAIL The payment accounts could not be refreshed.
ACCOUNT_REFRESH_SUCCESS The app successfully retrieved the selected payment account.
ACCOUNT_REFRESH_FAIL The selected payment account could not be retrieved.
RECEIPTS_RETRIEVE_SUCCESS The app successfully retrieved all receipts. Populate the following event parameter with the returned value:
RECEIPTS_EVENT_COUNT
RECEIPTS_RETRIEVE_FAIL The receipts could not be retrieved.
RECEIPTS_REFRESH_SUCCESS The app successfully refreshed the receipts list.
RECEIPTS_REFRESH_FAIL The receipts could not be retrieved.
NFC_SCAN_SUCCESS The app successfully captured the NFC token. Populate TRANSACTION_EVENT_REF_ID with the token value.
NFC_SCAN_FAIL The app did not capture the NFC token.
CONNECTION_LOST The heartbeat detection failed.
DEVICE_STATUS_CHECK_SUCCESS The device status was successfully obtained. Populate the following event parameters with the returned values:
DEVICE_STATUS_CHECK_EVENT_ACTIVE
DEVICE_STATUS_CHECK_EVENT_REGISTERED
DEVICE_STATUS_CHECK_FAIL The active and registered status of the device was not obtained.
MFA_RETRIEVE_SUCCESS The app successfully retrieved the MFA questions.
MFA_RETRIEVE_FAIL The app was not able to retrieve the MFA questions.
REGISTER_USER_SUCCESS A new wallet was successfully registered
REGISTER_USER_FAIL The new wallet registration failed.
USER_PROFILE_UPDATE_SUCCESS The user profile was successfully updated.
USER_PROFILE_UPDATE_FAIL The user profile update failed.
PASSWORD_UPDATE_SUCCESS The user password was successfully updated.
PASSWORD_UPDATE_FAIL The user password update failed.
PASSCODE_UPDATE_SUCCESS The user passcode was successfully updated.
PASSCODE_UPDATE_FAIL The user passcode update failed.
MFA_UPDATE_SUCCESS The secret question responses were successfully updated.
MFA_UPDATE_FAIL The secret question responses update failed.
EXPIRED_PASSWORD_UPDATE_SUCCESS The expired password was successfully updated.
EXPIRED_PASSWORD_UPDATE_FAIL The expired password update failed.
FORGOT_PASSWORD_RESET_SUCCESS The forgotten password was successfully reset.
FORGOT_PASSWORD_RESET_FAIL The forgotten password reset failed.
FORGOT_PASSCODE_RESET_SUCCESS The forgotten passcode was successfully reset.
FORGOT_PASSCODE_RESET_FAIL The forgotten passcode reset failed.
FORGOT_USERNAME_REQUEST_SUCCESS The forgotten username was successfully reset.
FORGOT_USERNAME_REQUEST_FAIL The forgotten username reset failed.
MFA_SUBMIT_SUCCESS The responses to the secret questions were successfully submitted.
MFA_SUBMIT_FAIL The responses to the secret questions were not submitted.
ACCOUNT_CONFIG_RETRIEVE_SUCCESS The account configuration values were successfully retrieved.
ACCOUNT_CONFIG_RETRIEVE_FAIL The account configuration retrieval failed.
ADD_ACCOUNT_SUCCESS The new payment account was successfully added.
ADD_ACCOUNT_FAIL The payment account was not added.
UPDATE_ACCOUNT_SUCCESS The payment account was successfully updated.
UPDATE_ACCOUNT_FAIL The payment account was not updated.
DELETE_ACCOUNT_SUCCESS The payment account was successfully deleted.
DELETE_ACCOUNT_FAIL The payment account was not deleted.
VERIFY_ACCOUNT_SUCCESS The payment account was verified.
VERIFY_ACCOUNT_FAIL The payment account verification failed.
UNLINK_DEVICE_SUCCESS The device was successfully disassociated from the wallet.
UNLINK_DEVICE_FAIL The device disassociation failed.
WIFI_PROFILE_INSTALL_SUCCESS The Wi-Fi profile was successfully installed.
WIFI_PROFILE_INSTALL_FAIL The Wi-Fi profile was not installed.
OFFER_RETRIEVE_SUCCESS The offers were successfully obtained.
OFFER_RETRIEVE_FAIL The offers retrieval failed.
OFFER_ACTIVATE_SUCCESS The offer was successfully activated.
OFFER_ACTIVATE_FAIL The offer activation failed.
MY_OFFER_RETRIEVE_SUCCESS The activated offers were successfully retrieved.
MY_OFFER_RETRIEVE_FAIL The activated offers retrieval failed.
MY_OFFER_REMOVE_SUCCESS The offer was successfully deactivated.
MY_OFFER_REMOVE_FAIL The offer deactivation failed.
OFFER_CAMPAIGN_RETRIEVAL_USING_COUPON_CODE_SUCCESS The offer campaign associated with the coupon code was successfully retrieved.
OFFER_CAMPAIGN_RETRIEVAL_USING_COUPON_CODE_FAIL An offer campaign associated with the coupon code could not be retrieved.
PASSWORD_POLICY_RETRIEVAL_SUCCESS The password policy was successfully obtained.
PASSWORD_POLICY_RETRIEVAL_FAIL The password policy retrieval failed.
ACCOUNT_BILLING_ADDRESS_RETRIEVE_SUCCESS The payment account billing addresses were successfully retrieved.
ACCOUNT_BILLING_ADDRESS_RETRIEVE_FAIL The payment account billing addresses retrieval failed.
PROFILE_INFO_RETRIEVE_SUCCESS The user’s profile information was successfully retrieved.
PROFILE_INFO_RETRIEVE_FAIL The user’s profile retrieval failed.
USER_SESSION_EXPIRED The current login session expired.
DEVICE_DESCRIPTION_UPDATE_SUCCESS The device description (Android uses the device model as the description) was successfully updated.
DEVICE_DESCRIPTION_UPDATE_FAIL The device description update failed.
CUSTOM_LOG_EVENT This event is reserved for custom log entries.
ACCOUNT_BALANCE_REFRESH_SUCCESS The balances for the payment accounts in the wallet were successfully refreshed.
ACCOUNT_BALANCE_REFRESH_FAIL The balances for the payment accounts in the wallet could not be refreshed.
ALL_TENDER_TYPES_RETRIEVE_SUCCESS The supported tender types for the transaction were obtained successfully.
ALL_TENDER_TYPES_RETRIEVE_FAIL The tender types supported for the transaction could not be retrieved.
TENDER_TYPE_RETRIEVE_SUCCESS The specified tender type was successfully retrieved.
TENDER_TYPE_RETRIEVE_FAIL The specified tender type could not be retrieved.
ISSUER_LIST_RETRIEVE_SUCCESS The list of Secure Cloud issuers supported for this wallet was successfully obtained.
ISSUER_LIST_RETRIEVE_FAIL The list of Secure Cloud issuers could not be retrieved.
ISSUER_APPLICATION_URL_RETRIEVE_SUCCESS The URL for the Secure Cloud application for the specified issuer was successfully obtained.
ISSUER_APPLICATION_URL_RETRIEVE_FAIL The Secure Cloud application URL for the specified issuer could not be retrieved.
TOKEN_RETRIEVE_SUCCESS The checkout token was successfully obtained.
TOKEN_RETRIEVE_FAIL The checkout token could not be retrieved.
TOKEN_RELEASE_SUCCESS The checkout token was successfully cleared of its association to the transaction.
TOKEN_RELEASE_FAIL The checkout token release failed.
TX_FLOW_METADATA_RETRIEVE_SUCCCESS The transaction metadata was successfully retrieved.
TX_FLOW_METADATA_RETRIEVE_FAIL Retrieving the transaction metadata failed.
TX_FLOW_UPDATE_SUCCESS The transaction was successfully updated with the provided data.
TX_FLOW_UPDATE_FAIL The transaction could not be updated with the provided data.
LOYALTY_POINT_BALANCE_REFRESH_SUCCESS The points balance for the loyalty program was successfully refreshed.
LOYALTY_POINT_BALANCE_FAIL The loyalty program points balance could not be updated.
LOYALTY_REGISTRATION_CHECK_SUCCESS The check to determine whether the wallet is registered for the loyalty program completed successfully.
LOYALTY_REGISTRATION_CHECK_FAIL The check to determine whether the wallet is registered for the loyalty program failed.
LOYALTY_PROFILE_METADATA_RETRIEVE_SUCCESS The metadata properties for the loyalty program profile were successfully obtained.
LOYALTY_PROFILE_METADATA_RETRIEVE_FAIL Retrieval of the metadata properties for the loyalty program failed.
LOYALTY_REGISTER_SUCCESS The user was successfully registered for the loyalty program. This event will trigger immediate sending of a log to the platform.
LOYALTY_REGISTER_FAIL The loyalty registration failed.
LOYALTY_AVAILABLE_PROGRAMS_RETRIEVE_SUCCESS Retrieval of the loyalty programs for which the user is eligible to register succeeded.
LOYALTY_AVAILABLE_PROGRAMS_RETRIEVE_FAIL Retrieval of the loyalty programs for which the user is eligible to register failed.
LOYALTY_MY_PROGRAMS_RETRIEVE_SUCCESS Retrieval of the loyalty programs for which the user has already registered succeeded.
LOYALTY_MY_PROGRAMS_RETRIEVE_FAIL Retrieval of the loyalty programs for which the user has already registered failed.
LOYALTY_PROGRAM_RETRIEVE_SUCCESS The URI of the requested loyalty program was successfully retrieved.
LOYALTY_PROGRAM_RETRIEVE_FAIL The URI of the requested loyalty program could not be retrieved.
LOYALTY_POINTS_RETRIEVE_SUCCESS The loyalty points for the transaction were successfully retrieved.
LOYALTY_POINTS_RETRIEVE_FAIL The loyalty points for the transaction could not be retrieved.
LOYALTY_RECORD_EXT_ACTIVITY_SUCCESS The external activity associated with the loyalty program was successfully recorded.
LOYALTY_RECORD_EXT_ACTIVITY_FAIL The external activity could not be recorded.
LOYALTY_OPTOUT_SUCCESS The user was successfully unsubscribed from the loyalty program.
LOYALTY_OPTOUT_FAIL The user’s loyalty program subscription could not be rescinded.
SPLIT_PARTIAL_PAYMENT_SUCCESS The partial payment was successfully applied to the transaction.
SPLIT_PARTIAL_PAYMENT_FAIL The partial payment failed to be applied to the transaction.
SPLIT_PAYMENT_SUCCESS The split payment transaction successfully completed (no further balance is due).
SPLIT_PAYMENT_FAIL The split payment failed.
CUSTOMER_INFO_RETRIEVE_SUCCESS The wallet user profile was successfully obtained.
CUSTOMER_INFO_RETRIEVE_FAIL The wallet user profile could not be retrieved.
ADDITIONAL_DEVICE_INFO_ADD_SUCCESS The custom device properties were successfully added.
ADDITIONAL_DEVICE_INFO_ADD_FAIL Adding the custom device properties failed.
ADDITIONAL_DEVICE_INFO_UPDATE_SUCCESS The custom device property value(s) was successfully updated.
ADDITIONAL_DEVICE_INFO_UPDATE_FAIL Updating the custom device property value(s) failed.
ADDITIONAL_DEVICE_INFO_DELETE_SUCCESS The custom device properties were successfully deleted.
ADDITIONAL_DEVICE_INFO_DELETE_FAIL Deleting the custom device properties failed.
ADDITIONAL_DEVICE_INFO_RETRIEVE_SUCCESS The custom device properties were successfully obtained.
ADDITIONAL_DEVICE_INFO_RETRIEVE_FAIL Retrieving the custom device properties failed.
GIFT_ACCOUNT_CONFIG_RETRIVE_SUCCESS The configuration parameters of the gift card payment account were successfully obtained.
GIFT_ACCOUNT_CONFIG_RETRIEVE_FAIL Could not retrieve the configuration parameters of the gift card payment account.
GIFT_ACCOUNT_LOAD_SUCCESS The gift card payment account balance was successfully reloaded.
GIFT_ACCOUNT_LOAD_FAIL Reloading the gift card balance failed.
ACCOUNT_RETRIEVE_SUCCESS The payment account identification was successfully obtained.
ACCOUNT_RETRIEVE_FAIL Retrieval of the payment account identification failed.
ACCOUNT_PROVISION_SUCCESS A new payment account was successfully issued to the wallet user and added to the wallet.
ACCOUNT_PROVISION_FAIL Provisioning a new payment account for the wallet user failed.
ORDER_HISTORY_RETRIEVE_SUCCESS The list of previous remote order submissions was successfully retrieved.
ORDER_HISTORY_RETRIEVE_FAIL The order history could not be retrieved.
VERIFICATION_EMAIL_RESENT_SUCCESS The registration verification email was successfully resent.
VERIFICATION_EMAIL_RESEND_FAIL Resending the registration verification email failed.
PASSCODE_POLICY_RETRIEVAL_SUCCESS The passcode policy was successfully obtained.
PASSCODE_POLICY_RETRIEVAL_FAIL The passcode policy retrieval failed.
FAVORITE_STORES_RETRIEVAL_SUCCESS The list of favorite stores was retrieved successfully.
FAVORITE_STORES_RETRIEVAL_FAIL The list of favorite stores could not be retrieved.
FAVORITE_STORE_RETRIEVAL_SUCCESS The requested favorite store was retrieved.
FAVORITE_STORE_RETRIEVAL_FAIL The requested favorite store could not be retrieved.
FAVORITE_STORE_SET_SUCCESS The specified store was saved as a favorite.
FAVORITE_STORE_SET_FAIL The specified store could not be saved as a favorite.
FAVORITE_STORE_REMOVE_SUCCESS The specified store is no longer a favorite.
FAVORITE_STORE_REMOVE_FAIL The specified store could not be updated.
BEACONS_RETRIEVE_SUCCESS The BLE beacons requested were retrieved.
BEACONS_RETRIEVE_FAIL The BLE beacons could not be retrieved.
CHECK_IN_SUCCESS The device successfully paired with the BLE service of the acceptance location.
CHECK_IN_FAIL The device was unable to pair with the BLE service of the acceptance location.
RECEIPTS_SUMMARY_RETRIEVE_SUCCESS The list of receipt summaries was retrieved successfully.
RECEIPTS_SUMMARY_RETRIEVE_FAIL The list of receipt summaries could not be retrieved.
RECEIPTS_DETAILS_RETRIEVE_SUCCESS The requested receipt was retrieved.
RECEIPTS_DETAILS_RETRIEVE_FAIL The requested receipt details could not be retrieved.
BLE_DEVICE_DISCOVERY_SUCCESS The BLE service has discovered a supported broadcasting device.
BLE_DEVICE_DISCOVERY_FAIL The BLE service failed to discover a supported broadcasting device.
BLE_SERVICE_DISCOVERY_SUCCESS The BLE service has discovered a broadcasting service.
BLE_SERVICE_DISCOVERY_FAIL The BLE service failed to discover a broadcasting service.
BLE_TOKEN_SCAN_SUCCESS The BLE service has successfully scanned a BLE-broadcast checkout token.
BLE_TOKEN_SCAN_FAIL The BLE service failed to scan a BLE-broadcast checkout token.

Logging Event Parameters

The logging event parameters included with the event types defined in Table 5 above are provided as set of key/value pairs, with keys defined in the com.paydiant.android.core.enums.PaydiantLoggingEntryKey enum class. Table 6 lists the event parameters available in the Paydiant Logging Utility.

Unavailable event parameters

WARNING: DO NOT USE the following event parameters for logging. They are papoulated by the Paydient Logging Utility.

Parameter Description
NETWORK_NAME Mobile network name.
MAC_ADDRESS Wi-Fi mac address.
WIFI_SSID Wi-Fi SSID.
DEVICE_ID Unique device id.
OS_VERSION Android OS version.
AVAILABLE_MEMORY Device's available memory.
RUNNING_PROCESSES Device's running processes.
MANUFACTURER Device manufacturer.
BRAND Device brand.
MODEL Device model.
LAST_SUCCESSFUL_HEARTBEAT Date and time of the last successful heartbeat occurred.
LAST_FAILED_HEARTBEAT Date and time of the last failed heartbeat.
APP_VERSION Application version.
EVENT_DATE Date and time that the event occurred.
EVENT_RESULT Event type.
EVENT_USER_MESSAGE Any prompted messages to the user when an error event occurs.
EVENT_ERROR_CODE Event error code.
EVENT_ERROR_DESCRIPTION Event error description.

Available logging events

The following event parameters are available for use in logging events.

SCAN_EVENT_TOKEN

Value returned when a token is successfully captured.

TRANSACTION_EVENT_TX_TYPE

Attribute value that specifies the type of transaction, such as purchase, refund, cash access, etc.

TRANSACTION_EVENT_REF_ID

Transaction reference id that uniquely identifies a specific transaction.

TRANSACTION_EVENT_MERCHANT_NAME

The value that identifies the mobile wallet acceptance merchant. for the transaction.

TRANSACTION_EVENT_STORE_LOCATION_NAME

The value that identifies the merchant location where the transaction occurred.

TRANSACTION_EVENT_PAYMENT_TOTAL

The final amount exchanged for the transaction.

RECEIPTS_EVENT_COUNT

The number of receipts returned from a successful retrieval.

DEVICE_STATUS_CHECK_EVENT_ACTIVE

The device’s active status.

DEVICE_STATUS_CHECK_EVENT_REGISTERED

The device’s registered status.

CUSTOM_MESSAGE_KEY

A key that can be used to send custom messages to the logs.

LATITUDE

A key that can be used to check the latitudinal position of the device at the time of the event.

LONGITUDE

A key that can be used to check the longitudinal position of the device at the time of the event.

ROUNDTRIP_DURATION

The amount of time, in milliseconds, that elapsed for the completion of a call, from the initial request to the completion of the response.

LOCATION_LOGGING_ENABLED

A key that specifies whether including the geo-location of the device in the log message is enabled in the SDK instance. The default value is NO.

SDK_VERSION

The version of the SDK on which the current app was a built.

LOYALTY_REGISTRATION_STATUS

The value of the setting indicating whether the wallet user is enrolled in the loyalty program.

TX_FLOW_STEP

The value of the flow rule that was executing at the time the event occurred.

APP_VERSION_CODE

Key indicating the versionCode attribute value set in the AndroidManifest.xml file.

BLE_DEVICE_NAME

Key indicating the name of a broadcasting BLE device discovered by the app.

BLE_DEVICE_ADDRESS

Key indicating the UUID of the discovered BLE device.

BLE_SERVICE_ID

Key indicating the name of a discovered BLE service.

BLE_SERVICE_UUID

Key indicating the UUID of the discovered BLE service.

BLE_SERVICES

A list of all BLE services (by name and UUID) discovered by the app.

BLE_SCAN_START

A timestamp that identifies when the BLE service began scanning, in the format MM/dd/yyy HH:mm:ss Z.

BLE_SCAN_END

A timestamp indicating when the BLE service stopped scanning, in the format MM/dd/yyy HH:mm:ss Z.

SDK_PROFILE_START_DATE

The timestamp indicating when the call was sent by the SDK, in the format MM-dd-yyy hh:mm:ss.

SDK_PROFILE_DURATION

The amount of time, in nano seconds, that it took for the call to complete.

Logging Utility Methods

The following methods are available for use by the developer to utilize the functionality of the Paydiant Logging Utility.

Initialize Paydiant logging utility

This method initializes the Paydiant Logging Utility and creates an instance for the purpose of collecting and sending log entries. This must be called before using any of the methods of the Logging Utility.

Item Description
Method public static void init(ContextWrapper contextWrapper, int queueSize, boolean sendDataInBackground)

contextWrapper - an instance of the Android ContextWrapper and is used collect information about the device.
queueSize - the maximum number of entries that the utility class's internal queue can hold. When the limit is reached, the oldest entry is dropped from the queue.
sendDataInBackground - a Boolean flag that enables (TRUE) or disables (FALSE) sending data while the app is in the background.
reachabilityInterval- the number of seconds that should elapse between reachability checks to determine when the app in is the foreground or background and deallocate the log queue memory accordingly.
reachabilityRetryAttempts - the number of times the app should attempt to determine reachability before considering the server unresponsive.
reachabilityRetryAttemptInterval is the number of seconds that should elapse between retry attempts.

Note: Large queue size is not optimal due to the increased memory usage of the app, which can cause memory related issues.

Get instance

Retrieves the instance of the Paydiant Logging Utility created by the init method. If this method is called before the init method, it throws the UnsupportedOperationException. Use init(ContextWrapper, int, boolean) to initialize the singleton instance.

Item Description
Method public static PaydiantLoggingUtility getInstance()

Activate custom logging

For SDK instances where the default internal logging of the Paydiant Logging Utility is not desired, developers should invoke this method to disable the feature and avoid duplicate logging.

Item Description
Method public void setCustomLoggingEnabled(Boolean);
Item Description
Method public void setLoggingEnabled(boolean loggingEnabled)

Add successful event log message

Use these overloaded methods to record log messages for successful operations originating from within the SDK.

Item Description
Method public synchronized void addSuccessLogMessage(PaydiantLoggingEventType eventType)

Use the following method to log success events that require addition data to be passed, such as token values, transaction reference ids, etc.

Item Description
Method public synchronized void addSuccessLogMessage(PaydiantLoggingEventType eventType, LinkedHashMap < PaydiantLoggingEntryKey, String > eventParameters)

Add successful external event log message

Use this method to record log messages for successful wallet-related events that occur outside this SDK, such as social media activity or store location searches. Use the eventParameters attribute to pass any additional information that is relevant to the event.

Item Description
Method public synchronized void addSuccessLogMessage(String eventType, LinkedHashMap < String, String > eventParameters)

Add failed event log message

Use these overloaded methods to log failed events. Any user prompts and exceptions thrown by the SDK should be included.

Item Description
Method public synchronized void addFailedLogMessage(PaydiantLoggingEventType eventType, String displayMessage, PaydiantException e)

Use the following method to log success events that require additional data to be passed, such as token values, transaction reference ids, etc.

Item Description
Method public synchronized void addFailedLogMessage(PaydiantLoggingEventType eventType, String displayMessage, PaydiantException e, LinkedHashMap < PaydiantLoggingEntryKey, String > eventParameters)

Add failed external event log message

Use this method to record log messages for failed wallet-related events that originate outside this SDK, such as social media activity or store location searches. Use the eventParameters attribute to pass any additional information that is relevant to the event or its cause for failure.

Item Description
Method public synchronized void addFailedLogMessage(String eventType, String displayMessage, Exception e, LinkedHashMap < String, String > eventParameters)

Add display message to failed event log

This method appends the log message for each failed event in the log with the message that was displayed to user in conjunction with the failure event. For example, the display message for a PASSWORD_UPDATE_FAIL event might be "The password must contain at least 1 capital and one number. Please try again." Developers should incorporate the display messages configured in the app for each different error condition that produces a failure for which a message is displayed to the user in the app in order to facilitate efficient and effective technical support.

Item Description
Method public void setLastFailedEventDisplayMessage(String displayMessage);

Send log messages

Submits the queue contents to the backend for logging. Sending log messages should be performed during the following key events:

  • User Logoff
  • Successful or failed sales, refunds and cash access operations
  • Successful or failed user registration
  • Device Unlink
Item Description
Method public synchronized void sendLogMessages()

Effective as of SDK 4.6, when the SDK is configured to use internal logging, developers are no longer required to send log messages for the noted key events above. However, if customer logging is fully enabled or partially enabled for any of the key events listed above, developers are still responsible for submitting log messages upon completion of any of these events that are not utilizing the SDK’s internal logging feature.

Note: To maximize performance, send logs while the application is in the background by setting the init method sendDataInBackground parameter to TRUE.

Other Resources

javadocs

Feedback

Have feedback?

Let us know.