loguru
loguru copied to clipboard
'Pretty logging with colors' available for .log files?
I have been banging around with the ideolog plugin for pycharm and I have not had success for producing a usable format for the output log files that would mirror what is printed to console.
The following portion of the documentation produces marvelous results to the console:

Would it be possible to have similar formatting on the output log files?
Here is what I see on the console vs what I see on the log file:


And I forgot to mention how much I love loguru... truly an awesome library.
Hi @deployment-ian, glad you like Loguru. ;)
There is no colors in a log files. Displaying colors is a "feature" of terminal but files are not designed to contain colors.
You can still force the "color codes" (which work on terminal) to be displayed by specifying colorize=True when adding your file sink, but it will likely not produce the output you expect.
Closing as I answered your question but feel free to re-open it otherwise.