Configure logs
How to configure logs to track your activities with Python SDK.
Read time 1 minuteLast updated a year ago
The log files are generated in the following format: . A new log file is generated for each session, which starts when you call .
UnityCloud_YYYY-MM-DD_HH-MM-SS.logunity_cloud.initialize()Find the logs
By default Python SDK logs are saved in a folder. To find Python SDK logs, go to AppData > .
UnityCloudUnityCloudSet a custom logging folder path
You can change the location where Python SDK logs are saved. To set a custom logging folder path, follow these steps:
- Locate the folder to use and store that path as a string.
- Use the method to edit the location of the folder as a string.
unity_cloud.set_logger_path
unity_cloud.set_logger_path( path = "path/to/folder" ) unity_cloud.initialize()
For each session started by calling a new log file is generated in the most recently set folder path. If the folder does not exist, the folder will be created for the logs. The method accepts both absolute and relative paths.
unity_cloud.initialize()Add a log entry
To add a log entry to the log file, follow these steps:
- Use the method and set the log message as a string.
unity_cloud.logger.log - Edit the log message level which defaults to an log level.
info - (Optional) Include a custom source for the message. The default value is .
Unity Cloud Python SDK
unity_cloud.initialize() unity_cloud.logger.log( message = "Test log message", level = unity_cloud.logger.log_level.info, source = "custom_source" )