nestjs-pino 2.2.0-alpha.eb571a → 2.2.0-alpha.ee81f1

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 +13 -0
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -443,6 +443,19 @@ import { Logger } from 'nestjs-pino';
443
443
  // ...
444
444
  ```
445
445
 
446
+ 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
+
448
+ ```ts
449
+ // main.ts
450
+ import { Logger } from 'nestjs-pino';
451
+
452
+ // ...
453
+ const app = await NestFactory.createApplicationContext(AppModule, { bufferLogs: true });
454
+ app.useLogger(app.get(Logger));
455
+ app.flushLogs();
456
+ // ...
457
+ ```
458
+
446
459
  In all the other places you can use built-in `Logger`:
447
460
 
448
461
  ```ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nestjs-pino",
3
- "version": "2.2.0-alpha.eb571a",
3
+ "version": "2.2.0-alpha.ee81f1",
4
4
  "description": "Pino logger for NestJS",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -55,7 +55,7 @@
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.1",
58
+ "jest": "27.2.5",
59
59
  "memorystream": "^0.3.1",
60
60
  "pino-http": "^5.6.0",
61
61
  "prettier": "^2.3.2",