Closed busslina closed 7 months ago
It is due to logger
using ANSI color codes when using ConsoleOutput
, so maybe this lib have to check if it is a web console and not use colored strings
Hi, yeah, it seems that the browser consoles do not support the ANSI color codes.
Fortunately, this can be easily solved by adding colors: false
to the constructor of the respective printer.
Nevertheless, I am not really a fan of making the default behavior platform dependent. If the user doesn't want colors, it is easy to configure in the constructor, heck if it is desired, even the user can make it platform dependent for their project in one single line ;)
printer: PrettyPrinter(
colors: !const bool.fromEnvironment('dart.library.js_util'),
),
@Bungeefan Thank you, I didn't knew that option
This case is on web (console) but I think it happens in sever (file).
Prints in web console this:
It is weird because it is printing okay this:
My logger is: