magillus / flutter-fimber

Fimber is Flutter logger inspired by Timber (logger API for Android)
106 stars 22 forks source link

Flutter not printing colors #72

Closed dash-dash-force closed 4 years ago

dash-dash-force commented 4 years ago

Hi guys,

I'm using Fimber for a project, and wanted to have colored output. I used the code below. However, I still get white-only output. I'm using iTerm2 on MacOS Catelina (10.15.3).

final tree = DebugTree(useColors: true);
Fimber.plantTree(tree);

Any idea?

magillus commented 4 years ago

Hi, thank you for filing issue. @dash-dash-force Do you have any unexpected characters? Does other terminal (original MacOS) displays colors?

dash-dash-force commented 4 years ago

Hey @magillus, thanks for your response. Both do not display colors as output of the app. I do see unexpected characters however, e.g. this output:

flutter: \^[[32m2020-04-02T09:39:55.414506

The \^[[32m wasn't there normally.

magillus commented 4 years ago

hmm.. thanks, it seems like the terminal app doesn't support this or the text encoding isn't picked up/setup. I will try to investigate this, I have access to Mac to try this out.

dash-dash-force commented 4 years ago

Awesome @magillus! Hope you'll find something :).

magillus commented 4 years ago

I can't reproduce it: image

Left is iTerm on right is MacOs terminal - both render colors correctly.

dash-dash-force commented 4 years ago

@magillus too bad, but thanks a lot for checking! Last question: which macOS version were you on?

magillus commented 4 years ago

I don't remember from top of my head - will check later. git clone repo and run this test yourself: dart test/colorize_test.dart

dash-dash-force commented 4 years ago

@magillus it works there! Weird .... 🤔

magillus commented 4 years ago

If you could create sample CLI app and try it again. But not sure what would be different then the test.

magillus commented 4 years ago

Closing the issue, if you still run into this on CLI in terminal please submit reproducible example and reopen issue.

Thank you.