forked from firka/flutter
[flutter_tools] create NotifyingLogger at the top level when running flutter run --machine or flutter attach --machine (#59087)
Removes dependency on injecting additional logger with zones
This commit is contained in:
@@ -783,6 +783,13 @@ class SilentStatus extends Status {
|
||||
timeoutConfiguration: timeoutConfiguration,
|
||||
stopwatch: stopwatch,
|
||||
);
|
||||
|
||||
@override
|
||||
void finish() {
|
||||
if (onFinish != null) {
|
||||
onFinish();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Constructor writes [message] to [stdout]. On [cancel] or [stop], will call
|
||||
|
||||
@@ -207,7 +207,9 @@ class AttachCommand extends FlutterCommand {
|
||||
? Daemon(
|
||||
stdinCommandStream,
|
||||
stdoutCommandResponse,
|
||||
notifyingLogger: NotifyingLogger(verbose: globals.logger.isVerbose),
|
||||
notifyingLogger: (globals.logger is NotifyingLogger)
|
||||
? globals.logger as NotifyingLogger
|
||||
: NotifyingLogger(verbose: globals.logger.isVerbose),
|
||||
logToStdout: true,
|
||||
)
|
||||
: null;
|
||||
|
||||
@@ -415,7 +415,9 @@ class RunCommand extends RunCommandBase {
|
||||
final Daemon daemon = Daemon(
|
||||
stdinCommandStream,
|
||||
stdoutCommandResponse,
|
||||
notifyingLogger: NotifyingLogger(verbose: globals.logger.isVerbose),
|
||||
notifyingLogger: (globals.logger is NotifyingLogger)
|
||||
? globals.logger as NotifyingLogger
|
||||
: NotifyingLogger(verbose: globals.logger.isVerbose),
|
||||
logToStdout: true,
|
||||
);
|
||||
AppInstance app;
|
||||
|
||||
Reference in New Issue
Block a user