Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

Commit

Permalink
apparently the old method was the right one
Browse files Browse the repository at this point in the history
  • Loading branch information
ildella committed Sep 28, 2023
1 parent 29c52d5 commit 12ccfd7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions http/tracer-fastify-logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ const {local} = require('../tracer')
module.exports = ({app, logLevel}) => {
const log = local({level: logLevel})
app.log = log
app.decorateRequest('log', log)
// app.decorate('log', log)
app.addHook('onRequest', (request, reply, done) => {
request.log = log
done()
})
return log
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "moar-js",
"version": "1.2.0",
"version": "1.2.1",
"description": "Simple JavaScript files I use across projects",
"author": {
"name": "Daniele Dellafiore"
Expand Down

0 comments on commit 12ccfd7

Please sign in to comment.