Hello,
I create an ODS and I would like save the inin-correlation-id to trace my datas. Can you help me ?
api_client = PureCloudPlatformClientV2.api_client.ApiClient().get_client_credentials_token(...)
api_response = PureCloudPlatformClientV2.AuthorizationApi(api_client).get_authorization_divisions()
inin-correlation-id = api_response.???
Thanks for advance.
Florian MONTAY
Hi Florian
You can add the following lines to your python code and grab the correlation ID from the log file.
PureCloudPlatformClientV2.configuration.logger.log_level = PureCloudPlatformClientV2.logger.LogLevel.LTrace
PureCloudPlatformClientV2.configuration.logger.log_format = PureCloudPlatformClientV2.logger.LogFormat.TEXT
PureCloudPlatformClientV2.configuration.logger.log_to_console = False
PureCloudPlatformClientV2.configuration.logger.log_file_path = "./pythonsdk.log"
Also, this article describes how you can configure your default logging behaviour for the SDK - https://developer.genesys.cloud/devapps/sdk/python
-Charlie
1 Like
Thanks a lot Charlie,
I didn't have the good variable (PureCloudPlatformClientV2.configuration.config_file_path)
Have a good day
Florian
1 Like
system
Closed
4
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.