sanjana2505006 opened a new pull request, #3372:
URL: https://github.com/apache/kvrocks/pull/3372

   I noticed that the CLI was printing error messages (like invalid arguments 
or config load failures) to `stdout`, which isn't ideal for scripting or 
standard error handling. This PR redirects those critical errors to `stderr`.
   
   I also enhanced the 
[PrintUsage](cci:1://file:///Users/sanjana./kvrocks/src/cli/main.cc:62:0-73:1) 
function to accept an output stream, so `-h`/`--help` still goes to `stdout` 
(as expected), but incorrect usage warnings go to `stderr`. The usage message 
itself has been slightly polished for better readability.
   
   Changes:
   - PrintUsage now takes an optional `std::ostream&` argument (defaults to 
`cout`).
   - Invalid command-line arguments now print usage to `cerr` and return exit 
code 1.
   - Config loading and logger initialization errors now print to `cerr`.
   - Added `<iostream>` include for correctness.


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