-
Notifications
You must be signed in to change notification settings - Fork 74
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
TerminalMode::MixedWarnings
(Errors *and Warnings* go to stderr
)
#78
Comments
Nice proposal. Given the amount of customization simplelog already allows, we should probably support more crazy use-cases for The way I would like to see this implemented would be something like a pub enum Target /* TODO: bikeshed over this name */ {
Stdout,
Stderr,
}
pub enum TerminalMode {
Stdout,
Stderr,
Mixed,
Custom {
error: Target,
warn: Target,
info: Target,
debug: Target,
trace: Target,
},
} With that done, we also might want to deprecate If that sounds like a good idea to you, please start working on a PR. If you have any questions, feel free to ping me. |
:D ahaa.. someone comes and offers free help, and you ask for more! |
I get that, but while splitting at warnings instead of errors, like you are proposing, sounds more reasonable on paper, the next person wants to split on Info for some reason. And who am I to say they are wrong? The only real solution to please everyone is just to make this customizable. Anyway, I get if you do not feel like implementing this. I will leave the issue open and maybe come around to doing it myself at some point. But I cannot promise anything :) |
I understand that reasoning. There is nobody around who wants that though, and I know it as an anti-pattern to implement stuff (in a much more complex way), to suit needs that are purely imagined. Also, if need for such a solution arises, it can still be done, and I think it makes sense to have shortcuts for both |
While I do agree with that line of reasoning in generell, I do not think an enum variant with five boolean flags really introduces unneeded complexity. The code has to check the
Fair. Thanks for your time anyway. I think these kinds of discussions are healthy for the project and while I do not always agree with suggestions, I am thankful for the feedback. |
I would like to have an other mode (have no good idea for the mode name) that does that - Warnings and Errors to
stderr
, everything else tostdout
.TerminalMode::Mixed
splits on Errors, this would split on Warnings.I imagine I could implement it myself, if you would prefer that, and would accept a PR for it.
The text was updated successfully, but these errors were encountered: