send app.progress events (#6744)
This commit is contained in:
@@ -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
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user