SourceHorizon / logger

Small, easy to use and extensible logger which prints beautiful logs.
https://pub.dev/packages/logger
MIT License
197 stars 33 forks source link

iPhone log have weird prefix #66

Closed gusdecool closed 6 months ago

gusdecool commented 6 months ago

If I connect via cable to iPhone and run the app. For some reason logger showing strange prefix as in pict below.

CleanShot 2024-03-13 at 20 42 00@2x

text version

flutter: ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
flutter: │ #0   Cache.getString (package:feedback_mobile/service/cache.dart:63:11)
flutter: │ #1   <asynchronous suspension>
flutter: ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
flutter: │ 🐛 cache hit "accessToken" expire at "2024-03-14T12:27:15.398175Z"
flutter: └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
flutter: \^[[38;5;12m┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────<…>
flutter: \^[[38;5;12m│ #0   _FeedbackDetailPageState._loadStat (package:feedback_mobile/Page/feedback_detail_page.dart:185:9)<…>
flutter: \^[[38;5;12m│ #1   <asynchronous suspension><…>
flutter: \^[[38;5;12m├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄<…>
flutter: \^[[38;5;12m│ 💡 FeedbackStatLoad<…>
flutter: \^[[38;5;12m└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────<…>

What could be wrong? This is not happening if I using Android Emulator. The iPhone iOS version is 17.4

Bungeefan commented 6 months ago

These are the failing ANSI codes:

gusdecool commented 6 months ago

@Bungeefan thank you for pointed me to the README docs. I fixed the issue by followed the docs and just disabled the color.

var logger = Logger(
    printer: PrefixPrinter(PrettyPrinter(colors: false))
);

The log now looks like this, not colorful, but still better than not able to read the docs.

CleanShot 2024-03-14 at 20 51 55@2x