Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IOS -> can't click on printed log and no colour #101

Open
SidneyMachara opened this issue Jul 22, 2021 · 2 comments
Open

IOS -> can't click on printed log and no colour #101

SidneyMachara opened this issue Jul 22, 2021 · 2 comments

Comments

@SidneyMachara
Copy link

  1. on iphone i cant click on the printed log so it opens the location of the log.
  2. all logs are blue, even if i do logger.e("") <-- this is suppose to be red but its blue
@SidneyMachara
Copy link
Author

SidneyMachara commented Jul 22, 2021

passing colors: false solves problem 1

var logger = Logger(
  printer: PrettyPrinter(
    colors: false, // <-- this line seems to solve problem 1
  ),
);

@yushihang
Copy link

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);
}

}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants