Unverified Commit 086fd993 authored by Devon Carew's avatar Devon Carew Committed by GitHub

add daemon.log to the daemon spec (#31273)

* add daemon.log to the daemon spec

* mention use in flutter run --machine
parent d9718aa4
......@@ -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
......
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