-
Notifications
You must be signed in to change notification settings - Fork 88
Verbose output
Lloyd Brookes edited this page Jun 23, 2019
·
5 revisions
Setting the --verbose
flag outputs a highly verbose JSON stream containing debug information. It is intended to aid debugging and to provide a datasource for custom views.
Any middleware module can send information to the verbose stream with this line (where key
is a identifying string e.g. middleware.example.config
and value
is the information to send).
this.emit('verbose', key, value)
You may hand-pick the keys to display in the verbose stream using --verbose.include
and --verbose.exclude
. Each option implies --verbose
and accepts one or more regular expressions.
This command outputs only information regarding the rewrite
middleware.
$ ws --verbose.include rewrite
Include only request
and response
info.
ws --verbose.include request response
Print everything except socket
and middleware
information.
$ ws --verbose.exclude socket middleware