simc / logger

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

Colors still not working?? #108

Open MilanObrenovic opened 3 years ago

MilanObrenovic commented 3 years ago

2 years later the colors are still not working in intellij..? did someone find a fix for this?

myfknoll commented 2 years ago

I am running Android Studio Arctic Fox |2020.3.1 Patch 2:

so guess this is fine. Hope this helps. Best regards

carrasc0 commented 2 years ago

I am running Android Studio Arctic Fox |2020.3.1 Patch 2:

  • "Logcat" is white
  • "Run" is in color

so guess this is fine. Hope this helps. Best regards

For android builds yes, iOs it doenst shoe the colors

yushihang commented 2 years ago

This issue is a bit complex, but we could solve it by changing logger/outputs/console_output.dart to below:

import 'dart:io'; import 'dart:developer' as developer; import 'package:flutter/foundation.dart'; import 'package:idealab/plugins/logger/log_output.dart'; import 'package:idealab/plugins/logger/logger.dart';

const bool _kReleaseMode = kReleaseMode; /// Default implementation of [LogOutput]. /// /// It sends everything to the system console. class ConsoleOutput extends LogOutput { @OverRide void output(OutputEvent event) { if (_kReleaseMode || !Platform.isIOS ) { event.lines.forEach(debugPrint); } else { event.lines.forEach(developer.log); }

} }