logger
logger copied to clipboard
IOS -> can't click on printed log and no colour
- on iphone i cant click on the printed log so it opens the location of the log.
- all logs are blue, even if i do logger.e("") <-- this is suppose to be red but its blue
passing colors: false solves problem 1
var logger = Logger(
printer: PrettyPrinter(
colors: false, // <-- this line seems to solve problem 1
),
);
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); }
} }