nestjs-pino 2.2.0-alpha.6abdcd → 2.2.0-alpha.6fe506

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 -2
  2. package/package.json +3 -3
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
@@ -545,8 +558,6 @@ All the other cases are lead to either code duplication or unexpected behavior.
545
558
 
546
559
  <h2 align="center">Do you use this library?<br/>Don't be shy to give it a star! ★</h2>
547
560
 
548
- ---
549
-
550
561
  Also if you are into NestJS ecosystem you may be interested in one of my other libs:
551
562
 
552
563
  [nestjs-pino](https://github.com/iamolegga/nestjs-pino)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nestjs-pino",
3
- "version": "2.2.0-alpha.6abdcd",
3
+ "version": "2.2.0-alpha.6fe506",
4
4
  "description": "Pino logger for NestJS",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -54,8 +54,8 @@
54
54
  "eslint": "^7.32.0",
55
55
  "eslint-config-prettier": "^8.3.0",
56
56
  "eslint-plugin-import": "^2.24.2",
57
- "eslint-plugin-prettier": "^3.4.1",
58
- "jest": "27.1.0",
57
+ "eslint-plugin-prettier": "^4.0.0",
58
+ "jest": "27.2.5",
59
59
  "memorystream": "^0.3.1",
60
60
  "pino-http": "^5.6.0",
61
61
  "prettier": "^2.3.2",