@ddd-ts-kit/pino 0.113.2 → 0.114.1

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.
package/README.fr.md CHANGED
@@ -1,5 +1,5 @@
1
1
  [English](README.md) · **Français**
2
- <!-- translation-of: README.md sha256:4a8c6a1bc0e68219 -->
2
+ <!-- translation-of: README.md sha256:916ccdfd8999eb2c -->
3
3
 
4
4
  # @ddd-ts-kit/pino
5
5
 
@@ -18,7 +18,7 @@ npm i -D pino-pretty # seulement pour le format lisible
18
18
  Écrit pour pino 10. `pino-pretty` 13 est un *peer* facultatif : il n'est chargé que lorsque le
19
19
  format `pretty` est demandé.
20
20
 
21
- ![La place du logger pino dans une application : le domaine et les gestionnaires ne journalisent rien ; les adaptateurs de l'infrastructure, les contrôleurs de la présentation et les aspects écrivent par le port Logger du noyau ; la racine de composition lie PinoLogger à ce port ; pino écrit des lignes JSON sur la sortie standard, que la plateforme collecte](https://raw.githubusercontent.com/gbourgeat/ddd-ts-kit/main/docs/assets/diagrams/pino-place-in-an-application.fr.svg)
21
+ ![La place du logger pino dans une application : le domaine et les gestionnaires ne journalisent rien ; les adaptateurs de l'infrastructure, les contrôleurs de la présentation et les aspects écrivent par le port Logger du noyau ; la racine de composition lie PinoLogger à ce port ; pino écrit des lignes JSON sur la sortie standard, que la plateforme collecte](https://raw.githubusercontent.com/ddd-ts-kit/ddd-ts-kit/main/docs/assets/diagrams/pino-place-in-an-application.fr.svg)
22
22
 
23
23
  Le domaine et les gestionnaires (handlers) disent ce qui s'est passé par des événements et des
24
24
  erreurs, jamais par une ligne de journal. Ce qui écrit les entoure : les adaptateurs de
@@ -83,7 +83,7 @@ Une ligne de l'application, telle qu'elle est écrite :
83
83
  {"level":"info","time":"2026-03-01T10:00:00.000Z","service":"shop-api","environment":"production","correlationId":"9f2c","origin":"http","actorId":"user-1","tenantId":"acme","trace_id":"4bf92f3577b34da6a3ce929d0e0e4736","span_id":"00f067aa0ba902b7","context":"shipping","message":"order shipped"}
84
84
  ```
85
85
 
86
- ![Le chemin d'un appel à logger.info : sous le seuil, il s'arrête après une comparaison ; sinon l'adaptateur décrit les erreurs parmi les champs et écarte les clés level et time ; pino écrit l'en-tête, puis service, environment et base, les champs des enfants, ce que renvoie fields() et les champs de la ligne ; il remplace la valeur de chaque clé de secret par [redacted] ; puis il confie la ligne JSON à sa destination : tout de suite sur la sortie standard, par un tampon de 4 Kio avec asynchronous, ou au worker de pino-pretty](https://raw.githubusercontent.com/gbourgeat/ddd-ts-kit/main/docs/assets/diagrams/pino-path-of-a-line.fr.svg)
86
+ ![Le chemin d'un appel à logger.info : sous le seuil, il s'arrête après une comparaison ; sinon l'adaptateur décrit les erreurs parmi les champs et écarte les clés level et time ; pino écrit l'en-tête, puis service, environment et base, les champs des enfants, ce que renvoie fields() et les champs de la ligne ; il remplace la valeur de chaque clé de secret par [redacted] ; puis il confie la ligne JSON à sa destination : tout de suite sur la sortie standard, par un tampon de 4 Kio avec asynchronous, ou au worker de pino-pretty](https://raw.githubusercontent.com/ddd-ts-kit/ddd-ts-kit/main/docs/assets/diagrams/pino-path-of-a-line.fr.svg)
87
87
 
88
88
  **Corrélation.** `fields` est lu à chaque ligne écrite, par le `mixin` de pino : aucun point
89
89
  d'appel ne passe d'identifiant. `traceLogFields(scope)` renvoie les identifiants de trace et de
@@ -97,7 +97,7 @@ si bien qu'une clé donnée par les deux est écrite deux fois et qu'un analyseu
97
97
  `fields`. `StdoutLogger` les ordonne de la même façon ; `@ddd-ts-kit/winston` non (là, un enfant
98
98
  l'emporte sur `fields`). Ne liez pas dans un enfant une clé que `fields` renvoie.
99
99
 
100
- ![La valeur que prend une clé donnée deux fois, de la plus faible à la plus forte : avec pino et StdoutLogger, service, environment et base, puis les enfants, puis fields(), puis la ligne, qui l'emporte ; avec winston, fields(), puis les enfants, puis la ligne, puis service, environment et base, qui l'emportent](https://raw.githubusercontent.com/gbourgeat/ddd-ts-kit/main/docs/assets/diagrams/pino-which-value-wins.fr.svg)
100
+ ![La valeur que prend une clé donnée deux fois, de la plus faible à la plus forte : avec pino et StdoutLogger, service, environment et base, puis les enfants, puis fields(), puis la ligne, qui l'emporte ; avec winston, fields(), puis les enfants, puis la ligne, puis service, environment et base, qui l'emportent](https://raw.githubusercontent.com/ddd-ts-kit/ddd-ts-kit/main/docs/assets/diagrams/pino-which-value-wins.fr.svg)
101
101
 
102
102
  **Une instance à vous.** Le projet qui configure déjà pino continue de le faire, et prend les
103
103
  pièces qu'il veut :
package/README.md CHANGED
@@ -16,7 +16,7 @@ npm i -D pino-pretty # only for the pretty format
16
16
  Written against pino 10. `pino-pretty` 13 is an optional peer: it is loaded only when the
17
17
  `pretty` format is asked for.
18
18
 
19
- ![Where the pino logger sits in an application: the domain and the handlers log nothing; the adapters of infrastructure, the controllers of presentation and the aspects write through the kernel Logger port; the composition root binds PinoLogger to that port; pino writes JSON lines to the standard output, which the platform collects](https://raw.githubusercontent.com/gbourgeat/ddd-ts-kit/main/docs/assets/diagrams/pino-place-in-an-application.svg)
19
+ ![Where the pino logger sits in an application: the domain and the handlers log nothing; the adapters of infrastructure, the controllers of presentation and the aspects write through the kernel Logger port; the composition root binds PinoLogger to that port; pino writes JSON lines to the standard output, which the platform collects](https://raw.githubusercontent.com/ddd-ts-kit/ddd-ts-kit/main/docs/assets/diagrams/pino-place-in-an-application.svg)
20
20
 
21
21
  The domain and the handlers say what happened with events and errors, never with a log line.
22
22
  What writes is around them: the adapters of `infrastructure/`, the controllers of
@@ -79,7 +79,7 @@ One line of the application, as it is written:
79
79
  {"level":"info","time":"2026-03-01T10:00:00.000Z","service":"shop-api","environment":"production","correlationId":"9f2c","origin":"http","actorId":"user-1","tenantId":"acme","trace_id":"4bf92f3577b34da6a3ce929d0e0e4736","span_id":"00f067aa0ba902b7","context":"shipping","message":"order shipped"}
80
80
  ```
81
81
 
82
- ![The path of one call to logger.info: below the threshold it stops after one comparison; otherwise the adapter describes the errors among the fields and drops the level and time keys; pino writes the header, then service, environment and base, the fields of the children, what fields() answers and the fields of the line; it replaces the value of every credential key by [redacted]; then it hands the JSON line to its destination, at once on the standard output, through a 4 KiB buffer with asynchronous, or to the pino-pretty worker](https://raw.githubusercontent.com/gbourgeat/ddd-ts-kit/main/docs/assets/diagrams/pino-path-of-a-line.svg)
82
+ ![The path of one call to logger.info: below the threshold it stops after one comparison; otherwise the adapter describes the errors among the fields and drops the level and time keys; pino writes the header, then service, environment and base, the fields of the children, what fields() answers and the fields of the line; it replaces the value of every credential key by [redacted]; then it hands the JSON line to its destination, at once on the standard output, through a 4 KiB buffer with asynchronous, or to the pino-pretty worker](https://raw.githubusercontent.com/ddd-ts-kit/ddd-ts-kit/main/docs/assets/diagrams/pino-path-of-a-line.svg)
83
83
 
84
84
  **Correlation.** `fields` is read at each line that is written, through the pino `mixin`: no
85
85
  call site passes an id. `traceLogFields(scope)` answers the trace and span ids inside a span,
@@ -92,7 +92,7 @@ by both is written twice and a JSON parser reads the one of `fields`. `StdoutLog
92
92
  them the same way; `@ddd-ts-kit/winston` does not (there a child wins over `fields`). Do not
93
93
  bind in a child a key that `fields` answers.
94
94
 
95
- ![Which value a key gets when it is given twice, from the weakest to the strongest: with pino and StdoutLogger, service, environment and base, then the children, then fields(), then the line, which wins; with winston, fields(), then the children, then the line, then service, environment and base, which win](https://raw.githubusercontent.com/gbourgeat/ddd-ts-kit/main/docs/assets/diagrams/pino-which-value-wins.svg)
95
+ ![Which value a key gets when it is given twice, from the weakest to the strongest: with pino and StdoutLogger, service, environment and base, then the children, then fields(), then the line, which wins; with winston, fields(), then the children, then the line, then service, environment and base, which win](https://raw.githubusercontent.com/ddd-ts-kit/ddd-ts-kit/main/docs/assets/diagrams/pino-which-value-wins.svg)
96
96
 
97
97
  **An instance of your own.** The project that already configures pino keeps doing so, and
98
98
  takes the pieces it wants:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ddd-ts-kit/pino",
3
- "version": "0.113.2",
3
+ "version": "0.114.1",
4
4
  "description": "Adapter of the kernel Logger port on pino, with trace and execution correlation on every line.",
5
5
  "keywords": [
6
6
  "ddd",
@@ -16,11 +16,11 @@
16
16
  "license": "MIT",
17
17
  "repository": {
18
18
  "type": "git",
19
- "url": "git+https://github.com/gbourgeat/ddd-ts-kit.git",
19
+ "url": "git+https://github.com/ddd-ts-kit/ddd-ts-kit.git",
20
20
  "directory": "packages/pino"
21
21
  },
22
- "homepage": "https://gbourgeat.github.io/ddd-ts-kit/packages/pino/",
23
- "bugs": "https://github.com/gbourgeat/ddd-ts-kit/issues",
22
+ "homepage": "https://ddd-ts-kit.github.io/ddd-ts-kit/packages/pino/",
23
+ "bugs": "https://github.com/ddd-ts-kit/ddd-ts-kit/issues",
24
24
  "publishConfig": {
25
25
  "access": "public",
26
26
  "provenance": true
@@ -40,10 +40,10 @@
40
40
  "dist"
41
41
  ],
42
42
  "dependencies": {
43
- "@ddd-ts-kit/kernel": "0.113.2"
43
+ "@ddd-ts-kit/kernel": "0.114.1"
44
44
  },
45
45
  "devDependencies": {
46
- "@ddd-ts-kit/testing": "0.113.2",
46
+ "@ddd-ts-kit/testing": "0.114.1",
47
47
  "pino": "^10.4.0",
48
48
  "pino-pretty": "^13.2.0"
49
49
  },