mali-logger
Development style logger middleware for Mali.
--> GetFeature unary--> GetFeature unary<-- GetFeature unary 22ms<-- GetFeature unary 32ms--> ListFeatures response_stream<-- ListFeatures response_stream 21ms--> RecordRoute request_stream<-- RecordRoute request_stream 10s--> RouteChat duplex<-- RouteChat duplex 10ms
Installation
$ npm install mali-logger
Example
var logger = var Mali = { ctxres = message: 'Hello ' + ctxreqname } const app = path 'Greeter'appappappstart'localhost:50051'
API
logger(options)
options.fullName
To log full name (fullName
) from context, otherwise logs just the name
. Default: false
.
app
Output:
--> /routeguide.RouteGuide/GetFeature unary<-- /routeguide.RouteGuide/GetFeature unary 22ms
Notes
Recommended that you .use()
this middleware near the top
to "wrap" all subsequent middleware.
License
Apache 2.0