yew1eb opened a new pull request, #3774:
URL: https://github.com/apache/celeborn/pull/3774

   ### What changes were proposed in this pull request?
   
   Expose the already-generated `LoggerApi` (`GET /api/v1/loggers` and `POST 
/api/v1/loggers`) in `celeborn-cli`, for both the `master` and `worker` 
subcommands:
   
   - `--show-loggers` (with optional `--logger-name` filter) to query logger 
levels
   - `--set-loglevel --logger-name <name> --logger-level <level>` to set a 
logger's level at runtime
   
   Usage examples:
   
   ```bash
   # Show all configured loggers of a worker
   celeborn-cli worker --hostport host:port --show-loggers
   
   # Show the level of a single logger of the master
   celeborn-cli master --hostport host:port --show-loggers --logger-name 
org.apache.celeborn
   
   # Set a logger level at runtime
   celeborn-cli worker --hostport host:port --set-loglevel --logger-name 
org.apache.celeborn --logger-level DEBUG
   ```
   
   ### Why are the changes needed?
   
   The logger level endpoints are already served by Master and Worker, and the 
`LoggerApi` client is already generated in `celeborn-openapi-client`, but they 
are not exposed in `celeborn-cli`. Exposing them allows adjusting log levels 
for troubleshooting without restarting Master/Worker or editing `log4j2.xml`.
   
   ### Does this PR resolve a correctness bug?
   
   - [ ] Yes
   
   ### Does this PR introduce _any_ user-facing change?
   
   - [x] Yes. New `celeborn-cli` actions `--show-loggers` and `--set-loglevel` 
(with `--logger-name`/`--logger-level` options) for both `master` and `worker` 
subcommands.
   
   ### How was this patch tested?
   
   New E2E test cases in `TestCelebornCliCommands` (mini cluster): 
`master/worker --show-loggers` and `master/worker --set-loglevel`, the latter 
verified by querying the level back. All 45 tests in the suite pass.


-- 
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