Welcome to our new developer portal! Use the "Ask" button to chat with our AI Agent.
For the complete documentation index, see llms.txt. This page is also available as Markdown.

iOS

Secure logs

Configure the Thales SDK to generate secure, obfuscated log files.

Enable or disable secure logging

Secure logging is enabled by default. You can disable it during Thales SDK initialization:

let serverUrl;
let serverCertificate;
let keyIdentifier;
let enableSecureLog; //Optional
let configurationBuilder = TMGClientConfiguration.Builder(serverUrl: serverUrl, 
                                                          serverCertificate: Data(serverCertificate.utf8), 
                                                          serverKeyId: keyIdentifier,
                                                          enableSecureLog: false)

In this example, enableSecureLog is set to false. This disables log generation after the Thales SDK is initialized. With the default setting (true), the SDK writes logs for the lifetime of the app process.

You can also pause logging temporarily:

// disable logs temporarily.
TMGClient.secureLog?.setLevel(.off)
 
// resume logging with the default log level.
TMGClient.secureLog?.setLevel(.warn)

Setting the log level to .off prevents the Thales SDK from writing any new secure log entries. Set it back to .warn (default) or another level to resume logging.

Retrieve secure log files

The Thales SDK generates secure log files in the application sandbox. Retrieve them like this:

logFiles contains an array of URL objects for the available log files. Share these files with the Thales delivery team when investigating an issue.

Console logs

View logs in console using the debug library:

  1. Open the Console app on your Mac.

  2. In the Console Action menu, enable both Include Info Messages and Include Debug Messages.

To see the logs in Console.app, filter on TMGSDK in the Search field.

Last updated

Was this helpful?