Skip to content

Unable to change the loglevel for graph sdk #209

@samrajcse

Description

@samrajcse

Hi Team,

I have enabled the DEBUG log using below code to debug the below error message:

Error message: Invalid batch payload format.

POST https://graph.microsoft.com/v1.0/$batch
SdkVersion : graph-java/v3.5.0
[...]

400 : Bad Request
[...]

[Some information was truncated for brevity, enable debug logging for more details]

Now I have enabled the debug mode using below code,
GraphServiceClient graphClient = graphClientBuilder.buildClient();
graphClient.getLogger().setLoggingLevel(LoggerLevel.DEBUG);

Now I am executing the batch request with 3.5.0 java SDK. I am not getting the debug statements. On debuging the source code i found BatchResponseStep class hard coded the verbose parameter with false by default. Please guide me to enable verbose logging for batch requests.

Code snippet:
throw GraphServiceException.createFromResponse("", "", new ArrayList<>(), "", headers, "", status, error, false);
AB#9533

Metadata

Metadata

Assignees

Labels

Standard GitHub labelIssue caused by core project dependency modules or librarybugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions