microsoftgraph / msgraph-sdk-java

Microsoft Graph SDK for Java
https://docs.microsoft.com/en-us/graph/sdks/sdks-overview
MIT License
373 stars 125 forks source link

logger.setLoggingLevel(LoggerLevel.DEBUG) doesn't capture the Request and Response for Successful API calls #2171

Open boeapen opened 2 days ago

boeapen commented 2 days ago

I am looking for logging the complete request and response for all API calls and using logger.setLoggingLevel(LoggerLevel.DEBUG), its capturing only the API calls that is returned with an error/exceptions (Successfull calls like 200, 201, 202 etc are not captured). In the SDK Documentation, I am not able to find anything specific for logging on how we can use the SDK for logging the requests and response. I am looking for two things: A) Can you share the SDK documentation which explains more on the available logging functionality and how to use those? B) How I can enable Debug logging for all API requests including Successful ones too? TIA

Ndiritu commented 2 hours ago

Hi @boeapen We still have documentation gaps to address around logging. We use OpenTelemetry by default to log. Please see this sample for how to set this up.

boeapen commented 1 hour ago

Thanks for the details. Any plans on adding a documentation around logging? This is a must have.