nestjs-pino 2.2.0-alpha.3f4c90 → 2.2.0-alpha.47dddc

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +8 -6
  2. package/package.json +7 -7
package/README.md CHANGED
@@ -15,7 +15,7 @@
15
15
  <a href="https://snyk.io/test/github/iamolegga/nestjs-pino">
16
16
  <img alt="Snyk Vulnerabilities for npm package" src="https://img.shields.io/snyk/vulnerabilities/npm/nestjs-pino" />
17
17
  </a>
18
- <img alt="David" src="https://img.shields.io/david/iamolegga/nestjs-pino">
18
+ <img alt="Libraries.io" src="https://img.shields.io/librariesio/release/npm/nestjs-pino">
19
19
  <img alt="Dependabot" src="https://badgen.net/dependabot/iamolegga/nestjs-pino/?icon=dependabot">
20
20
  <img alt="Supported platforms: Express & Fastify" src="https://img.shields.io/badge/platforms-Express%20%26%20Fastify-green" />
21
21
  </p>
@@ -231,7 +231,9 @@ import { LoggerModule } from 'nestjs-pino';
231
231
  name: 'add some name to every JSON line',
232
232
  level: process.env.NODE_ENV !== 'production' ? 'debug' : 'info',
233
233
  // install 'pino-pretty' package in order to use the following option
234
- prettyPrint: process.env.NODE_ENV !== 'production',
234
+ transport: process.env.NODE_ENV !== 'production'
235
+ ? { target: 'pino-pretty' }
236
+ : {},
235
237
  useLevelLabels: true,
236
238
  // and all the others...
237
239
  },
@@ -443,16 +445,16 @@ import { Logger } from 'nestjs-pino';
443
445
  // ...
444
446
  ```
445
447
 
446
- Note that for [standalone applications](https://docs.nestjs.com/standalone-applications), buffering has to be disabled manually after custom logger is ready to be used by NestJS (refer to [this issue](https://github.com/iamolegga/nestjs-pino/issues/553) for more details):
448
+ Note that for [standalone applications](https://docs.nestjs.com/standalone-applications), buffering has to be [flushed using app.flushLogs()](https://github.com/nestjs/nest/blob/24e6c821a0859448646fd88831f20e4c5ae50980/packages/core/nest-application-context.ts#L136) manually after custom logger is ready to be used by NestJS (refer to [this issue](https://github.com/iamolegga/nestjs-pino/issues/553) for more details):
447
449
 
448
450
  ```ts
449
451
  // main.ts
450
452
  import { Logger } from 'nestjs-pino';
451
- import { Logger as BaseLogger } from '@nestjs/common';
452
- // ...
453
+
454
+ // ...
453
455
  const app = await NestFactory.createApplicationContext(AppModule, { bufferLogs: true });
454
456
  app.useLogger(app.get(Logger));
455
- BaseLogger.flush();
457
+ app.flushLogs();
456
458
  // ...
457
459
  ```
458
460
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nestjs-pino",
3
- "version": "2.2.0-alpha.3f4c90",
3
+ "version": "2.2.0-alpha.47dddc",
4
4
  "description": "Pino logger for NestJS",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -49,15 +49,15 @@
49
49
  "@types/node": "^16.0.0",
50
50
  "@types/pino-http": "^5.4.3",
51
51
  "@types/supertest": "^2.0.11",
52
- "@typescript-eslint/eslint-plugin": "^4.29.3",
53
- "@typescript-eslint/parser": "^4.29.3",
54
- "eslint": "^7.32.0",
52
+ "@typescript-eslint/eslint-plugin": "^5.3.1",
53
+ "@typescript-eslint/parser": "^5.3.1",
54
+ "eslint": "^8.2.0",
55
55
  "eslint-config-prettier": "^8.3.0",
56
56
  "eslint-plugin-import": "^2.24.2",
57
57
  "eslint-plugin-prettier": "^4.0.0",
58
- "jest": "27.2.4",
58
+ "jest": "27.3.1",
59
59
  "memorystream": "^0.3.1",
60
- "pino-http": "^5.6.0",
60
+ "pino-http": "^6.0.0",
61
61
  "prettier": "^2.3.2",
62
62
  "reflect-metadata": "^0.1.13",
63
63
  "rimraf": "^3.0.2",
@@ -86,6 +86,6 @@
86
86
  "testEnvironment": "node"
87
87
  },
88
88
  "peerDependencies": {
89
- "pino-http": "^5.6.0"
89
+ "pino-http": "^6.0.0"
90
90
  }
91
91
  }