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

paris should respect "set_write_log_enable_colors" #98

Closed
jb-alvarado opened this issue Feb 24, 2022 · 4 comments · Fixed by #126
Closed

paris should respect "set_write_log_enable_colors" #98

jb-alvarado opened this issue Feb 24, 2022 · 4 comments · Fixed by #126

Comments

@jb-alvarado
Copy link

jb-alvarado commented Feb 24, 2022

Hi,
thanks for all your effort in this nice project!

As you can read in the title I would suggest, that the paris feature, for coloring text with html tags, should respect the setting set_write_log_enable_colors(false). I think at the moment it is a bit inconsistent and it is not always useful to have them on.

@Drakulix
Copy link
Owner

Hey, thanks for the input!
Unfortunately this is not something simplelog can easily provide, because it has no control over what exactly paris returns. To facilitate this kind of feature simplelog would have to manually remove color control codes from the logging output again. This is better solved by adding a global toggle to the paris-crate, which then could also be set by simplelog's set_write_log_enable_colors.

@jb-alvarado
Copy link
Author

Thank you for your answer! I understand.

I wrote a feature request on paris.

@jb-alvarado
Copy link
Author

@Drakulix, I got this reply:

I could add a new method that accepts a flag that tells it to only remove the tags and not replace them with ANSI codes although > that's kind of as far as I can take it. Handling whether or not that flag should be true or false needs to be done in the simplelog crate.
Would that be enough for you guys?

Is that ok for you?

@Drakulix
Copy link
Owner

I answered directly on the paris issue. :)
Thanks for reaching out!

shimaowo added a commit to shimaowo/simplelog.rs that referenced this issue May 30, 2023
…ther a given logger uses or strips paris formatting. Only available with the paris feature, defaults to enabled for backwards compatibility. Fixes Drakulix#98 and Drakulix#112
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants