Welcome to our new developer portal! Use the "Ask" button to chat with our AI Agent.

D1 SDKログを取得する

Secure logs

D1 SDK can be configured to generate secure encrypted log files.

These files can only be read by the Thales delivery team.

Enable or disable secure logging

The Secure Log feature is enabled by default. It can however be disabled during the initialisation of D1 SDK as follows.

In this example, the disableLogService method of the D1Task.Builder structure is called so that the SDK does not generate logs after the D1Task object has been instantiated. If the default setting is used where the disableLogService method is not called, the SDK will generate logs for the duration of the application runtime.

There is an option to disable the logs temporarily, if necessary:

Setting the log level to OFF will prevent any subsequent calls to D1 SDK from generating entries in the secure logs. It is necessary to set the log level back to another value (WARN by default) in order to resume the generating of logs.

Retrieve secure log files

The D1 SDK secure log files are generated within the application sandbox. Retrieving these files can be done as follows:

The logFiles variable will contain an array of File objects pointing to the available log files. These files are used by the Thales delivery team when investigating an issue.

Logcat

Before you can retrieve the log files from an Android device, ensure that you have done the following setup:

  • The Android Debug Bridge tool (ADB) is ready at the host system.

  • The USB debugging option is enabled on the device under test.

  • The Android device is connected to the host system by means of an USB cable and the USB driver has been installed.

You may execute the following command in the command prompt to verify your setup:

A response similar to the following code snippet indicates that the device can be reached by the ADB tool:

If this is not the case, check that the prerequisites are met as specified above.

There are guides available covering these steps on the web.

For setup from the beginning, you may refer to https://support.citrix.com/article/CTX232375.

  1. Open the command prompt and clear all the log buffers in the device:

  2. Start the log capturing:

  3. Perform the use case(s).

  4. Press CTRL+C in the command prompt to stop the log capturing.

  5. Recover the resulting log file TestLogFileName.txt in the same command execution folder as mentioned in step 2.

SDK variant and log filters

  • In order to obtain the most detailed logging, ensure that the application version used has been built with an SDK variant named debug. See Deliverables section for more details.

  • Avoid using log filters that will limit the log messages captured as these data will be useful for troubleshooting purposes.

  • It is recommended to limit the size of the log by limiting the time the log is captured. This means that start capturing just before the use case begins and stop capturing immediately after the use case has been completed as described in the the above steps.

Log filters

Different D1 SDK services use different log filters:

  • D1 Push filter: TPCSDK

  • D1 Pay filter: SDK_ENTRY_POINT, util.h

最終更新

役に立ちましたか?