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

Respect flexilogger writer format #4

Open
mathsaey opened this issue Apr 17, 2020 · 2 comments
Open

Respect flexilogger writer format #4

mathsaey opened this issue Apr 17, 2020 · 2 comments

Comments

@mathsaey
Copy link

It would be great if the logger-view could use the format that was set on the flexi logger instance. If this is not possible, some other way to override the default styling would be nice.

@fin-ger
Copy link
Member

fin-ger commented Apr 20, 2020

As of now, this is not possible as cursive is using a special type to create (color-) formatted strings, the StyledString.

See CursiveLogWriter::write for the current implementation.

I would prefer a solution where the flexi-logger formatting gets translated to a cursive StyledString. I do not want to implement my own log formatting, as this would not integrate quite well with how flexi-logger was supposed to work.

However, as you noted, the current solution is a non-solution. I'm open to ideas and will try to look into it in the next days/weeks.

@MikeCain
Copy link

Until this is implemented, I'd like to suggest removing the .format(formatter_fn_here) from example code.
I was really scratching my head trying to figure out why nothing would change when I changed my format function haha 😛

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

3 participants