-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
print *all* HTTP requests to log if configured #1550
print *all* HTTP requests to log if configured #1550
Conversation
would it make sense to have that setting be http log level, and can be default to debug or something else that isn't on by default? |
@drcrallen that would be ok as well, so basically we write our own Slf4jRequestLog (maybe just extend it) and do logger.degug(..) instead of logger.info(..) instead of having a config in ServerConfig? |
@@ -32,6 +32,9 @@ | |||
private int numThreads = Math.max(10, (Runtime.getRuntime().availableProcessors() * 17) / 16 + 2) + 30; | |||
|
|||
@JsonProperty | |||
private boolean enableHttpRequestLogging = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we document the config?
@himanshug : I was thinking just use our normal logging implementation, then if you're needing http debug logs you can enable debug logs in your log4j2.xml for only that class. |
ce8e098
to
96cefc9
Compare
@drcrallen removed the new ServerConfig setting and doing log.debug(..) instead |
@fjy @drcrallen can you please see and thumbs-up/merge if there are no further comments? |
👍 |
👍 Looks very nice. With log4j2 you should be able to open up a jconsole to the jvm with the log4j2 plugin and enable logging dynamically if you wanted to be really fancy on the operational side of this feature. @himanshug Do you want to squash? |
96cefc9
to
90b4759
Compare
@drcrallen squashed |
print *all* HTTP requests to log if configured
I understand that there is, druid.request.logging.type, which does not look general enough to print all http requests received by server but mainly targeted towards printing query requests.