Commit 974da474 authored by Dan Rubel's avatar Dan Rubel Committed by GitHub

send app.progress events (#6744)

parent f1b3523b
......@@ -715,10 +715,9 @@ class _AppRunLogger extends Logger {
int id = _nextProgressId++;
_sendLogEvent(<String, dynamic>{
'log': message,
'progress': true,
'id': id.toString()
_sendProgressEvent(<String, dynamic>{
'id': id.toString(),
'message': message,
});
_status = new _AppLoggerStatus(this, id);
......@@ -735,6 +734,13 @@ class _AppRunLogger extends Logger {
else
domain._sendAppEvent(app, 'log', event);
}
void _sendProgressEvent(Map<String, dynamic> event) {
if (domain == null)
printStatus('event sent after app closed: $event');
else
domain._sendAppEvent(app, 'progress', event);
}
}
class _AppLoggerStatus implements Status {
......@@ -756,8 +762,7 @@ class _AppLoggerStatus implements Status {
}
void _sendFinished() {
logger._sendLogEvent(<String, dynamic>{
'progress': true,
logger._sendProgressEvent(<String, dynamic>{
'id': id.toString(),
'finished': true
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment