-
Notifications
You must be signed in to change notification settings - Fork 364
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
[CELEBORN-1797] Support to adjust the logger level with RESTful API during runtime #3022
base: main
Are you sure you want to change the base?
Conversation
LGTM, Thanks @turboFei , change log level at runtime is very useful for debugging. |
@@ -456,6 +456,44 @@ paths: | |||
type: string | |||
format: binary | |||
|
|||
/api/v1/logger: |
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.
This PR is amazing, can you provide an API to list all logger names since we don't know the logger names?
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.
sure
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.
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.
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.
loggerContext.getConfiguration.getLoggers
is reasonable.
It only return the configured logger, including the items in the config file and changed by POST /api/v1/loggers
.
celeborn/common/src/test/resources/log4j2-test.xml
Lines 31 to 40 in 680b072
<Loggers> | |
<Root level="INFO"> | |
<AppenderRef ref="stdout"/> | |
<AppenderRef ref="file"/> | |
</Root> | |
<Logger name="org.sparkproject.jetty" level="WARN" additivity="false"> | |
<AppenderRef ref="stdout"/> | |
<AppenderRef ref="file"/> | |
</Logger> | |
</Loggers> |
What changes were proposed in this pull request?
Support to adjust the logger level during runtime without restarting the server.
Why are the changes needed?
It is useful for debug, likes hadoop daemonlog command: https://hadoop.apache.org/docs/r3.4.1/hadoop-project-dist/hadoop-common/CommandsManual.html#daemonlog
Does this PR introduce any user-facing change?
Yes, new RESTful api.
How was this patch tested?
GA.