laabr
laabr copied to clipboard
no query params, no message
When I use curl
to make request to hapi I am getting this information:
curl -X DELETE -H "Authorization: Bearer $TOKEN" "http://localhost:9000/api/foo?blub=hufnefal"
{"statusCode":400,"error":"Bad Request","message":"failed to delete"}%
The information I am after in the logs are
- 400
- blub=hufnefal
- failed to delete
But I am somehow not getting that information with
{
plugin: Laabr,
options: {
colored: true,
formats: {
response: ':time :method :url :status :payload (:responseTime ms)'
}
}
}
and
"dependencies": {
...
"@hapi/hapi": "21.3.2",
"joi": "17.11.0",
"laabr": "6.1.3",
...
},
I tried specifying message
and I also tried specifying logQueryParams
as suggested in #104
I would have thought this should do the trick:
{
plugin: Laabr,
options: {
colored: true,
hapiPino: { logQueryParams: true },
formats: {
response: ':time :method :url :status :payload (:responseTime ms) :message'
}
}
}
What am I missing?
Also tried:
response: ':time :method :url :status :payload (:responseTime ms) :error[field=message]
Just a pointer would be great.
Is the project abandoned, @felixheck ?