Configure logs
How to configure logs to track your activities with Python SDK.
Read time 1 minuteLast updated 2 months ago
The log files are generated in the following format:
UnityCloud_YYYY-MM-DD_HH-MM-SS.log
unity_cloud.initialize()
Find the logs
By default Python SDK logs are saved in aUnityCloud
UnityCloud
Set 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
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" )