middleware-logger
HTTP request logger middleware for Marble.js
Last updated
HTTP request logger middleware for Marble.js
Last updated
Simple middleware for request logging inside your console. It displays the outgoing request events using the following format:
Requires @marblejs/core
to be installed.
Default behavior. Log every response to process.stdout:
2. Customized logging behavior:
silent - When true
the logging is turned off (usually useful during testing),
filter - Filter outgoing responses or incoming requests based on given predicate. For example we can log only HTTP status codes above 400.
parameter
definition
options
<optional> LoggerOptions
parameter
definition
silent
<optional> boolean
filter
<optional> HttpRequest -> boolean