hapi-boombox
Advanced tools
Comparing version 1.1.0 to 1.1.2
# Changelog | ||
## 1.1.2 | ||
* Added more data to the loging | ||
## 1.1.0 | ||
* Added extra loging info on `reply.boom` | ||
* Better linting |
@@ -72,11 +72,17 @@ var Boom = require('boom'); | ||
var explosion = internals.boom(error, returnError, convert); | ||
var log = { | ||
error: explosion.output || explosion, | ||
path: this.request.path, | ||
query: this.request.query, | ||
method: this.request.method | ||
data: { | ||
path: this.request.url.path, | ||
query: this.request.query, | ||
method: this.request.method, | ||
payload: this.request.payload, | ||
headers: this.request.headers, | ||
info: this.request.info | ||
} | ||
}; | ||
if (this.request.auth.credentials) { | ||
log.credentials = { | ||
log.data.credentials = { | ||
id: this.request.auth.credentials.id, | ||
@@ -86,5 +92,5 @@ name: this.request.auth.credentials.name | ||
} | ||
server.log(internals.tags, log); | ||
return this.response(explosion); | ||
this.response(explosion); | ||
return server.log(internals.tags, log); | ||
}); | ||
@@ -91,0 +97,0 @@ |
{ | ||
"name": "hapi-boombox", | ||
"version": "1.1.0", | ||
"version": "1.1.2", | ||
"description": "Boom error wrapper", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -26,9 +26,8 @@ [![Build Status](https://travis-ci.org/AdriVanHoudt/Hapi-Boombox.svg)](https://travis-ci.org/AdriVanHoudt/Hapi-Boombox) | ||
* error: the restult of Boombox, | ||
* path: the path from where Boombox was called, | ||
* query: the query params as object from the request, | ||
* method: the method from the request [get, post, ...], | ||
* credentials: if present this will be an object that includes 2 properties from `request.auth.credentials`. | ||
* `id` and `name`. | ||
* These are properties required by the author for his project. If you want more or something custumizable make an issue or PR. | ||
* `error`: the restult of Boombox, | ||
* `data`: additional info about the request | ||
* `path`, `query`, `method`, `payload`, `headers`, `request.info`, `credentials` | ||
* `credentials`: if present this will be an object that includes 2 properties from `request.auth.credentials`. | ||
* `id` and `name`. | ||
* These are properties required by the author for his project. If you want more or something custumizable make an issue or PR. | ||
@@ -35,0 +34,0 @@ ## Test |
17465
331
40