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

Unable to disable colored output with CombinedLogger #63

Closed
ghost opened this issue Sep 23, 2020 · 3 comments
Closed

Unable to disable colored output with CombinedLogger #63

ghost opened this issue Sep 23, 2020 · 3 comments

Comments

@ghost
Copy link

ghost commented Sep 23, 2020

Looking at the documentation I did not see an option to disable colored output with TermLogger, so I decided to attempt to disable the default features. I did not realize this would then disable the usage of TermLogger completely. I have an option in my program to also log to a file, not just the terminal, and CombinedLogger does not seem to allow combining of SimpleLogger and WriteLogger.

Is there a way to disable colored output while using a CombinedLogger? Currently in some cases the colors can become unreadable, for example the blue text in a default colored Powershell window since it has a blue background.

@Drakulix
Copy link
Owner

This is a good issue, because there should likely be a config option to disable coloring.
BUT that said, combining a SimpleLogger and a WriteLogger should work, could you also tell me, exactly what kind of error you were running into??

@ghost
Copy link
Author

ghost commented Sep 27, 2020

I double checked and it does appear that SimpleLogger works with CombinedLogger, I wonder if I had a typo when I originally tried it. I believe it was a type mismatch but I can certainly open a new issue if I run into it again, as this crate works really well and I use it with most projects. That said, I think it might still be good to have an option for colors in case someone has a use for TermLogger but does not want color.

@Drakulix
Copy link
Owner

Should be fixed by #72

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

No branches or pull requests

1 participant