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 { ...@@ -715,10 +715,9 @@ class _AppRunLogger extends Logger {
int id = _nextProgressId++; int id = _nextProgressId++;
_sendLogEvent(<String, dynamic>{ _sendProgressEvent(<String, dynamic>{
'log': message, 'id': id.toString(),
'progress': true, 'message': message,
'id': id.toString()
}); });
_status = new _AppLoggerStatus(this, id); _status = new _AppLoggerStatus(this, id);
...@@ -735,6 +734,13 @@ class _AppRunLogger extends Logger { ...@@ -735,6 +734,13 @@ class _AppRunLogger extends Logger {
else else
domain._sendAppEvent(app, 'log', event); 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 { class _AppLoggerStatus implements Status {
...@@ -756,8 +762,7 @@ class _AppLoggerStatus implements Status { ...@@ -756,8 +762,7 @@ class _AppLoggerStatus implements Status {
} }
void _sendFinished() { void _sendFinished() {
logger._sendLogEvent(<String, dynamic>{ logger._sendProgressEvent(<String, dynamic>{
'progress': true,
'id': id.toString(), 'id': id.toString(),
'finished': true '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