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

Add format for stdout #51

Merged
merged 1 commit into from
Jul 2, 2020
Merged

Conversation

pscott
Copy link

@pscott pscott commented Jul 1, 2020

Closes #50

This PR adds a function fn format_for_stdout(&self, format: FormatFunction) that allows users to specify which format they want stdout to use.

One can now write

.log_target(LogTarget::File)
.duplicate_to_stderr(Duplicate::All)
.duplicate_to_stdout(Duplicate::Info)
.format_for_stdout(colored_fmt)

and having stderr without colors, but stdout with colors!

@emabee emabee merged commit 92125fe into emabee:master Jul 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add format for stdout
2 participants