New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@eropple/nestjs-bunyan

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eropple/nestjs-bunyan - npm Package Compare versions

Comparing version

to
0.5.4

17

dist/request-tracker.interceptor.js

@@ -26,5 +26,8 @@ "use strict";

const res = ctx.getResponse();
const data = {};
data.method = req.method;
data.url = req.url;
const method = req.method;
const url = req.url;
const data = {
method,
url,
};
if (this.options.ipSalt) {

@@ -50,3 +53,9 @@ data.ipHash =

const ms = (new Date()).valueOf() - start.valueOf();
this._logger.info({ request: "end", code: res.statusCode, ms });
this._logger.info({
request: "end",
code: res.statusCode,
ms,
method,
url,
});
}));

@@ -53,0 +62,0 @@ }

{
"name": "@eropple/nestjs-bunyan",
"version": "0.5.2",
"version": "0.5.4",
"description": "Module and tooling for request-scoped Bunyan logging in NestJS.",

@@ -5,0 +5,0 @@ "main": "dist",

@@ -10,2 +10,6 @@ # `@eropple/nestjs-bunyan` #

## Recent Changes ##
### 0.5.4 ###
- Added `method` and `url` to the end events for request logging. This
is a convenience addition to make request timing easier. (h/t @briankracoff)
### 0.5.2 ###

@@ -12,0 +16,0 @@ - Exported `BunyanLoggerService` from `@eropple/nestjs-bunyan-logger` into

@@ -30,8 +30,10 @@ import * as Bunyan from "bunyan";

const res = ctx.getResponse<ServerResponse>();
const method = req.method;
const url = req.url;
const data: { [key: string]: any } = {};
const data: { [key: string]: any } = {
method,
url,
};
data.method = req.method;
data.url = req.url;
if (this.options.ipSalt) {

@@ -61,3 +63,9 @@ data.ipHash =

const ms = (new Date()).valueOf() - start.valueOf();
this._logger.info({ request: "end", code: res.statusCode, ms });
this._logger.info({
request: "end",
code: res.statusCode,
ms,
method,
url,
});
}),

@@ -64,0 +72,0 @@ );

Sorry, the diff of this file is not supported yet