From 086fd993c60c2610124a87f0e534b1f99bdebda3 Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Thu, 18 Apr 2019 20:07:52 -0700 Subject: [PATCH] add daemon.log to the daemon spec (#31273) * add daemon.log to the daemon spec * mention use in flutter run --machine --- packages/flutter_tools/doc/daemon.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/flutter_tools/doc/daemon.md b/packages/flutter_tools/doc/daemon.md index 1a849b34f77..4b54e2ad0ec 100644 --- a/packages/flutter_tools/doc/daemon.md +++ b/packages/flutter_tools/doc/daemon.md @@ -63,10 +63,9 @@ The `daemon.connected` event is sent when the daemon starts. The `params` field - `version`: The protocol version. This is the same version returned by the `version()` command. - `pid`: The `pid` of the daemon process. -#### daemon.logMessage - -The `daemon.logMessage` event is sent whenever a log message is created - either a status level message or an error. The JSON message will contain an `event` field with the value `daemon.logMessage`, and an `params` field containing a map with `level`, `message`, and (optionally) `stackTrace` fields. +#### daemon.log +This is sent when user-facing output is received. The `params` field will be a map with the field `log`. The `log` field is a string with the output text. If the output indicates an error, an `error` boolean field will be present, and set to `true`. #### daemon.showMessage @@ -74,6 +73,12 @@ The `daemon.showMessage` event is sent by the daemon when some if would be usefu It is up to the client to decide how best to display the message; for some clients, it may map well to a toast style notification. There is an implicit contract that the daemon will not send too many messages over some reasonable period of time. +#### daemon.logMessage + +The `daemon.logMessage` event is sent whenever a log message is created - either a status level message or an error. The JSON message will contain an `event` field with the value `daemon.logMessage`, and an `params` field containing a map with `level`, `message`, and (optionally) `stackTrace` fields. + +Generally, clients won't display content from `daemon.logMessage` events unless they're set to a more verbose output mode. + ### app domain #### app.restart @@ -202,6 +207,7 @@ The following subset of the daemon domain is available in `flutter run --machine - [`shutdown`](#daemonshutdown) - Events - [`connected`](#daemonconnected) + - [`log`](#daemonlog) - [`logMessage`](#daemonlogmessage) ### app domain