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.
Warning
Some devices require the device logging to be enabled from a vendor's specific configuration menu.
For example on Huawei devices, this is hidden under a menu that could be reached by dialing *#*#2846579#*#* You may check the information at https://stackoverflow.com/questions/18124334/huawei-logcat-not-showing-the-log-for-my-app for more details.
Recommended steps for capturing logs
Open the command prompt and clear all the log buffers in the device:
Start the log capturing:
Perform the use case(s).
Press
CTRL+Cin the command prompt to stop the log capturing.Recover the resulting log file
TestLogFileName.txtin 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:
TPCSDKD1 Pay filter:
SDK_ENTRY_POINT,util.h
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 initialization of D1 SDK as follows.
In this example, enableSecureLog property of the D1Task.Components structure is set to false so that the SDK does not generate logs after D1Task object has been instantiated. If the default setting is used where the enableSecureLog method is set to true, 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.
How to 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 URL objects pointing to the available log files. These files are used by the Thales delivery team when investigating an issue.
Console
The logs can retrieved using the debug library of D1 SDK by performing the following steps:
Open the Console app on your Mac.
Ensure that both options
Include Info MessagesandInclude Debug Messagesare checked as follows:

Console logs is only available for D1 Push on iOS devices. To see the log in the Console.app, add the TPCSDK filter in the Search field.
最終更新
役に立ちましたか?