Azure / Azure/azure-sdk-for-java

[mgmt] discussion, enhance logging experience

Open
#46,465 0 comments 0 reactions 1 assignee Claimed by @XiaofeiCao View on GitHub
Mgmt
Dominant language
Java
Stars
2.6k
Forks
2.2k
Avg merge
2d 8h
Merged PRs (30d)
178

Description

### issue
1. When customer met the HTTP response header issue, there are no request/response logs present. Customer couldn't figure out whether the issue was SDK itself or backend service. In this case, they need a way to log request/response even if SDK failed to parse the response.
2. They couldn't change the log level during client runtime.

### Current state
For 1. , to enable Netty logs, currently there are two ways:
1) Customer need to create their own Netty client and pass that to their HttpClient builder. We can look into making it easier to set this up instead of them creating Netty client instance. E.g. if a certain env var is set, enable full error logging which logs everything if there's an exception
2) Enable Netty logging in slf4j implementation. E.g. for log4j, one could do `log4j.logger.reactor.netty=DEBUG` in `log4j.properties`.

For 2, we've considered it before, though decided not to do it due to significant performance hits.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.