ethqunzhong opened a new pull request #14200:
URL: https://github.com/apache/pulsar/pull/14200


   
   ### Motivation
   
   As default, Broker log level set by `log4j2.yaml` with 
`pulsar.log.level=info`, if developers want to update log level to debug, need 
to Modify `log42j.yaml#pulsar.log.level=debug` and then restart Broker service.
   
   This PR support developers dynamic update Broker log level at runtime,It is 
very useful for online trouble shooting without having to stop Broker service 
and start it again.
   
   ### Modifications
   
   - add admin cli  (`bin/pulsar-admin brokers update-logger-level --classname 
${CLASSNAME} --level ${LEVEL}`)
   - add rest endpoints (`/admin/v2/brokers/log4j/{classname}/{level}`)
   
   ### Verifying this change
   
   -  Make sure that the change passes the CI checks.
   
   * This change added tests and can be verified as 
follows:`org.apache.pulsar.admin.cli.PulsarAdminToolTest#brokers`
   * works as expected on product environment.
   
   
   
   ### Does this pull request potentially affect one of the following parts:
   
   *If `yes` was chosen, please highlight the changes*
   
   - Dependencies (does it add or upgrade a dependency): (no)
   - The public API: (no)
   - The schema: (no)
   - The default values of configurations: (no)
   - The wire protocol: (no)
   - The rest endpoints: (yes)
   - The admin cli options: (yes)
   - Anything that affects deployment: (no)
   
   ### Documentation
   
   - [x] `no-need-doc` 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to