While prepping for an update that will address some vulnerabilities in our infrastructure I am attempting to update the Genesys Cloud Go SDK to the latest version. After doing so I found that logging is not performing as expected. It has started emitting a log entry for every api call that is not json formatted and doesn't appear to follow the standard logging format.
As an example here are two separate runs of the exact same example code with the only change being the first run is sdk version 156 and the second is version 160 which is the current version at this time.
In the following set of logs you will notice that after an update to a version greater than 156 there is now log entries like entry 1 and 4.
Version 156 Logs:
Microsoft Windows [Version 10.0.26100.4061]go run ./...
{"date":"2025-06-06T06:10:56.2217529-07:00","level":"trace","method":"POST","url":"https://login.mypurecloud.com/oauth/token","requestHeaders":{"Authorization":["[REDACTED]"],"Content-Type":["application/x-www-form-urlencoded"]},"responseHeaders":{"Content-Length":["147"],"Content-Type":["application/json"],"Critical-Origin-Trial":["Tpcd"],"Date":["Fri, 06 Jun 2025 13:10:55 GMT"],"Inin-Correlation-Id":["--"],"Origin-Trial":["--"],"Strict-Transport-Security":["max-age=31536000"],"Vary":["Accept-Encoding"]},"correlationId":"--","statusCode":200,"requestBody":"grant_type=client_credentials"}
{"date":"2025-06-06T06:10:56.2239811-07:00","level":"debug","method":"POST","url":"https://login.mypurecloud.com/oauth/token","requestHeaders":{"Authorization":["[REDACTED]"],"Content-Type":["application/x-www-form-urlencoded"]},"statusCode":200,"requestBody":"grant_type=client_credentials"}
{"date":"2025-06-06T06:10:56.4574064-07:00","level":"trace","method":"GET","url":"https://api.mypurecloud.com/api/v2/ipranges","requestHeaders":{"Accept":["application/json"],"Authorization":["[REDACTED]"],"Content-Type":["application/json"]},"responseHeaders":{"Cache-Control":["no-cache, no-store, must-revalidate"],"Content-Length":["6194"],"Content-Type":["application/json"],"Date":["Fri, 06 Jun 2025 13:10:56 GMT"],"Inin-Correlation-Id":["--"],"Strict-Transport-Security":["max-age=31536000; includeSubDomains"],"Via":["1.1 --.cloudfront.net (CloudFront)"],"X-Amz-Cf-Id":["--"],"X-Amz-Cf-Pop":["LAX50-P2"],"X-Cache":["Miss from cloudfront"]},"correlationId":"--","statusCode":200}
{"date":"2025-06-06T06:10:56.4574064-07:00","level":"debug","method":"GET","url":"https://api.mypurecloud.com/api/v2/ipranges","requestHeaders":{"Accept":["application/json"],"Authorization":["[REDACTED]"],"Content-Type":["application/json"]},"statusCode":200}
Microsoft Windows [Version 10.0.26100.4061]
UPGRADING TO VERSION 160:
Microsoft Windows [Version 10.0.26100.4061]go mod tidy
go: finding module for package github.com/mypurecloud/platform-client-sdk-go/v160/platformclientv2
go: found github.com/mypurecloud/platform-client-sdk-go/v160/platformclientv2 in github.com/mypurecloud/platform-client-sdk-go/v160 v160.0.0
Microsoft Windows [Version 10.0.26100.4061]go run ./...
2025/06/06 06:12:37 [DEBUG] POST https://login.mypurecloud.com/oauth/token
{"date":"2025-06-06T06:12:38.3353881-07:00","level":"trace","method":"POST","url":"https://login.mypurecloud.com/oauth/token","requestHeaders":{"Authorization":["[REDACTED]"],"Content-Type":["application/x-www-form-urlencoded"]},"responseHeaders":{"Content-Length":["147"],"Content-Type":["application/json"],"Critical-Origin-Trial":["Tpcd"],"Date":["Fri, 06 Jun 2025 13:12:37 GMT"],"Inin-Correlation-Id":["--"],"Origin-Trial":["--"],"Strict-Transport-Security":["max-age=31536000"],"Vary":["Accept-Encoding"]},"correlationId":"--","statusCode":200,"requestBody":"grant_type=client_credentials"}
{"date":"2025-06-06T06:12:38.3365076-07:00","level":"debug","method":"POST","url":"https://login.mypurecloud.com/oauth/token","requestHeaders":{"Authorization":["[REDACTED]"],"Content-Type":["application/x-www-form-urlencoded"]},"statusCode":200,"requestBody":"grant_type=client_credentials"}
2025/06/06 06:12:38 [DEBUG] GET https://api.mypurecloud.com/api/v2/ipranges
{"date":"2025-06-06T06:12:38.5620522-07:00","level":"trace","method":"GET","url":"https://api.mypurecloud.com/api/v2/ipranges","requestHeaders":{"Accept":["application/json"],"Authorization":["[REDACTED]"],"Content-Type":["application/json"]},"responseHeaders":{"Cache-Control":["no-cache, no-store, must-revalidate"],"Content-Length":["6194"],"Content-Type":["application/json"],"Date":["Fri, 06 Jun 2025 13:12:38 GMT"],"Inin-Correlation-Id":["--"],"Strict-Transport-Security":["max-age=31536000; includeSubDomains"],"Via":["1.1 --.cloudfront.net (CloudFront)"],"X-Amz-Cf-Id":["--"],"X-Amz-Cf-Pop":["LAX50-P2"],"X-Cache":["Miss from cloudfront"]},"correlationId":"--","statusCode":200}
{"date":"2025-06-06T06:12:38.5625631-07:00","level":"debug","method":"GET","url":"https://api.mypurecloud.com/api/v2/ipranges","requestHeaders":{"Accept":["application/json"],"Authorization":["[REDACTED]"],"Content-Type":["application/json"]},"statusCode":200}
Microsoft Windows [Version 10.0.26100.4061]
#PlatformSDK------------------------------
Joshua Morlan
Staff Engineer
------------------------------