Skip to content
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

Make the console logging output stream configurable. #9569

Closed
bpasson opened this issue May 25, 2020 · 4 comments · Fixed by #17819
Closed

Make the console logging output stream configurable. #9569

bpasson opened this issue May 25, 2020 · 4 comments · Fixed by #17819
Labels
kind/enhancement New feature or request
Milestone

Comments

@bpasson
Copy link
Contributor

bpasson commented May 25, 2020

Description
For command line applications it can be useful to have console log to standard err instead of standard out because standard out can then be used to output command line results. When console logging is output on std err it makes capturing the command line output a lot easier since not logs have to be filtered out.

Even better would be an option to be able to have two console loggers, one for standard err and one for standard out which can be configured individually. This way you can output to console using a logger on both streams and not have to fall back to System.out or System.err for one or the other.

Implementation ideas
No idea if this is easy to do, but maybe add a second console logger for standard err which is disabled by default and configurable like the console logger is now. I'm guessing some work needs to be done to make the default logger configurable (seems to be console on standard out now). No idea yet how to resolve which logging needs to go to which appender.

@bpasson bpasson added the kind/enhancement New feature or request label May 25, 2020
@gsmet
Copy link
Member

gsmet commented May 25, 2020

Sounds like a very legitimate request, thanks for opening this issue.

/cc @stuartwdouglas

@stuartwdouglas
Copy link
Member

@dmlloyd can JBoss Logging handle this ATM?

@dmlloyd
Copy link
Member

dmlloyd commented May 27, 2020

Yes, it should be trivial to add a property to the console handler config to specify whether the output should go to console, stdout, or stderr.

@bpasson
Copy link
Contributor Author

bpasson commented May 27, 2020

If there is anything I can do to help out let me know.

stuartwdouglas added a commit to stuartwdouglas/quarkus that referenced this issue Jun 10, 2021
@quarkus-bot quarkus-bot bot added this to the 2.1 - main milestone Jun 10, 2021
@gsmet gsmet modified the milestones: 2.1 - main, 2.0.0.Final Jun 10, 2021
gsmet pushed a commit to gsmet/quarkus that referenced this issue Jun 10, 2021
Fixes quarkusio#9569

(cherry picked from commit e095c1c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants