@beignet/provider-logger-pino 0.0.21 → 0.0.23
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/CHANGELOG.md +8 -0
- package/README.md +35 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -41,6 +41,9 @@ export const server = await createNextServer({
|
|
|
41
41
|
|
|
42
42
|
The provider installs `ctx.ports.logger`.
|
|
43
43
|
|
|
44
|
+
`beignet doctor --strict` checks that installed Pino logger providers are
|
|
45
|
+
registered in `server/providers.ts`.
|
|
46
|
+
|
|
44
47
|
## Environment
|
|
45
48
|
|
|
46
49
|
The provider reads `LOG_`-prefixed environment variables:
|
|
@@ -76,6 +79,38 @@ log.error("Failed to publish post", { error });
|
|
|
76
79
|
| `LoggerPort` | Re-export from `@beignet/core/ports` |
|
|
77
80
|
| `LogLevel` | Re-export from `@beignet/core/ports` |
|
|
78
81
|
|
|
82
|
+
## Installed ports
|
|
83
|
+
|
|
84
|
+
The provider contributes `ctx.ports.logger`, the standard Beignet
|
|
85
|
+
`LoggerPort`. It does not expose a provider-specific escape hatch because child
|
|
86
|
+
loggers and bindings are available through the stable port.
|
|
87
|
+
|
|
88
|
+
## Instrumentation
|
|
89
|
+
|
|
90
|
+
This provider does not record devtools provider events for each log call. Logs
|
|
91
|
+
are the primary output. Use provider instrumentation on the external providers
|
|
92
|
+
doing work, and include `requestId`, `traceId`, actor, tenant, or feature
|
|
93
|
+
metadata in log bindings when those fields are useful operational context.
|
|
94
|
+
|
|
95
|
+
## Failure behavior
|
|
96
|
+
|
|
97
|
+
Invalid `LOG_*` configuration fails during provider setup. If
|
|
98
|
+
`LOG_FORMAT=pretty` is configured without `pino-pretty`, the provider falls back
|
|
99
|
+
to JSON logging and emits a warning instead of failing startup.
|
|
100
|
+
|
|
101
|
+
## Local and tests
|
|
102
|
+
|
|
103
|
+
Use `LOG_FORMAT=pretty` for local development when `pino-pretty` is installed.
|
|
104
|
+
Use a memory or fake `LoggerPort` in use-case tests when assertions should not
|
|
105
|
+
depend on console output.
|
|
106
|
+
|
|
107
|
+
## Deployment notes
|
|
108
|
+
|
|
109
|
+
Use JSON logs in production unless the runtime explicitly expects formatted
|
|
110
|
+
text. Set `LOG_SERVICE` per deployed service and include request/trace metadata
|
|
111
|
+
from Beignet context so logs correlate with devtools, provider events, and
|
|
112
|
+
error reports.
|
|
113
|
+
|
|
79
114
|
## Read next
|
|
80
115
|
|
|
81
116
|
- Docs site logging guide: https://beignetjs.com/logging
|