@contrast/agent-bundle 5.46.0 → 5.48.0
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.md +1 -1
- package/node_modules/@contrast/agent/README.md +1 -1
- package/node_modules/@contrast/agent/package.json +12 -12
- package/node_modules/@contrast/agentify/package.json +15 -15
- package/node_modules/@contrast/architecture-components/package.json +5 -5
- package/node_modules/@contrast/assess/lib/{session-configuration → configuration-analysis}/common.js +1 -1
- package/node_modules/@contrast/assess/lib/{session-configuration → configuration-analysis}/handlers.js +23 -10
- package/node_modules/@contrast/assess/lib/{session-configuration → configuration-analysis}/index.js +6 -4
- package/node_modules/@contrast/assess/lib/configuration-analysis/install/apollo-server.js +92 -0
- package/node_modules/@contrast/assess/lib/{session-configuration → configuration-analysis}/install/express-session.js +2 -2
- package/node_modules/@contrast/assess/lib/{session-configuration → configuration-analysis}/install/fastify-cookie.js +2 -2
- package/node_modules/@contrast/assess/lib/configuration-analysis/install/graphql-yoga.js +90 -0
- package/node_modules/@contrast/assess/lib/{session-configuration → configuration-analysis}/install/hapi.js +2 -2
- package/node_modules/@contrast/assess/lib/{session-configuration → configuration-analysis}/install/koa.js +3 -3
- package/node_modules/@contrast/assess/lib/dataflow/propagation/install/string/substring.js +1 -1
- package/node_modules/@contrast/assess/lib/dataflow/sinks/install/fs.js +8 -15
- package/node_modules/@contrast/assess/lib/dataflow/sources/handler.js +9 -2
- package/node_modules/@contrast/assess/lib/dataflow/sources/index.js +2 -0
- package/node_modules/@contrast/assess/lib/dataflow/sources/install/fastify-websocket.js +63 -0
- package/node_modules/@contrast/assess/lib/dataflow/sources/install/http.js +42 -38
- package/node_modules/@contrast/assess/lib/dataflow/sources/install/koa/index.js +1 -1
- package/node_modules/@contrast/assess/lib/dataflow/sources/install/koa/koa-bodyparsers.js +76 -48
- package/node_modules/@contrast/assess/lib/dataflow/sources/install/koa/koa-multer.js +1 -1
- package/node_modules/@contrast/assess/lib/dataflow/sources/install/koa/koa-routers.js +2 -2
- package/node_modules/@contrast/assess/lib/dataflow/sources/install/koa/{koa2.js → koa.js} +3 -3
- package/node_modules/@contrast/assess/lib/dataflow/sources/install/socket.io.js +80 -0
- package/node_modules/@contrast/assess/lib/index.d.ts +4 -3
- package/node_modules/@contrast/assess/lib/index.js +1 -1
- package/node_modules/@contrast/assess/lib/policy.js +2 -2
- package/node_modules/@contrast/assess/package.json +12 -12
- package/node_modules/@contrast/common/lib/constants.d.ts +12 -4
- package/node_modules/@contrast/common/lib/constants.js +16 -7
- package/node_modules/@contrast/common/lib/types.d.ts +5 -1
- package/node_modules/@contrast/common/package.json +1 -1
- package/node_modules/@contrast/config/lib/common.js +1 -0
- package/node_modules/@contrast/config/lib/options.js +7 -1
- package/node_modules/@contrast/config/package.json +3 -3
- package/node_modules/@contrast/core/package.json +5 -5
- package/node_modules/@contrast/deadzones/package.json +5 -5
- package/node_modules/@contrast/dep-hooks/lib/export-handler-registry.js +1 -10
- package/node_modules/@contrast/dep-hooks/lib/export-hook-descriptor.js +1 -1
- package/node_modules/@contrast/dep-hooks/lib/index.d.ts +1 -1
- package/node_modules/@contrast/dep-hooks/lib/index.js +1 -1
- package/node_modules/@contrast/dep-hooks/lib/package-finder.d.ts +3 -2
- package/node_modules/@contrast/dep-hooks/lib/package-finder.js +14 -4
- package/node_modules/@contrast/dep-hooks/package.json +4 -4
- package/node_modules/@contrast/esm-hooks/README.md +2 -2
- package/node_modules/@contrast/esm-hooks/package.json +6 -6
- package/node_modules/@contrast/instrumentation/package.json +5 -5
- package/node_modules/@contrast/library-analysis/lib/install/library-reporting/dep.json +166 -224
- package/node_modules/@contrast/library-analysis/lib/install/library-reporting/index.js +2 -11
- package/node_modules/@contrast/library-analysis/lib/install/library-reporting/utils.js +2 -0
- package/node_modules/@contrast/library-analysis/lib/install/library-usage/index.js +3 -1
- package/node_modules/@contrast/library-analysis/lib/util.js +0 -2
- package/node_modules/@contrast/library-analysis/package.json +4 -4
- package/node_modules/@contrast/logger/package.json +4 -4
- package/node_modules/@contrast/metrics/package.json +6 -6
- package/node_modules/@contrast/patcher/package.json +2 -2
- package/node_modules/@contrast/protect/lib/error-handlers/index.js +1 -1
- package/node_modules/@contrast/protect/lib/error-handlers/install/{koa2.js → koa.js} +4 -4
- package/node_modules/@contrast/protect/lib/index.d.ts +1 -1
- package/node_modules/@contrast/protect/lib/input-analysis/index.js +2 -3
- package/node_modules/@contrast/protect/lib/input-analysis/install/koa-bodyparsers.js +92 -0
- package/node_modules/@contrast/protect/lib/input-analysis/install/{koa2.js → koa.js} +5 -5
- package/node_modules/@contrast/protect/lib/input-tracing/install/fs.js +0 -8
- package/node_modules/@contrast/protect/package.json +11 -11
- package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/application-activity/translations.js +6 -10
- package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/routes-observed.js +4 -0
- package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/traces/index.d.ts +1 -1
- package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/traces/index.js +1 -1
- package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/traces/translations.d.ts +1 -1
- package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/traces/translations.js +22 -9
- package/node_modules/@contrast/reporter/lib/reporters/file.js +1 -1
- package/node_modules/@contrast/reporter/package.json +6 -6
- package/node_modules/@contrast/rewriter/package.json +5 -5
- package/node_modules/@contrast/route-coverage/lib/index.d.ts +2 -2
- package/node_modules/@contrast/route-coverage/lib/index.js +12 -2
- package/node_modules/@contrast/route-coverage/lib/install/express.js +535 -0
- package/node_modules/@contrast/route-coverage/lib/install/fastify/fastify-express.js +71 -0
- package/node_modules/@contrast/route-coverage/lib/install/fastify/fastify-middie.js +67 -0
- package/node_modules/@contrast/route-coverage/lib/install/{fastify.js → fastify/fastify.js} +32 -22
- package/node_modules/@contrast/route-coverage/lib/install/{express → fastify}/index.js +6 -5
- package/node_modules/@contrast/route-coverage/lib/install/graphql.js +6 -1
- package/node_modules/@contrast/route-coverage/lib/install/koa.js +39 -45
- package/node_modules/@contrast/route-coverage/lib/install/socket.io.js +127 -0
- package/node_modules/@contrast/route-coverage/lib/utils/route-info.js +26 -1
- package/node_modules/@contrast/route-coverage/package.json +8 -8
- package/node_modules/@contrast/scopes/package.json +5 -5
- package/node_modules/@contrast/sec-obs/package.json +9 -9
- package/node_modules/@contrast/sources/lib/index.js +65 -22
- package/node_modules/@contrast/sources/lib/index.test.js +78 -33
- package/node_modules/@contrast/sources/lib/source-info.js +1 -10
- package/node_modules/@contrast/sources/package.json +3 -3
- package/node_modules/@contrast/telemetry/package.json +5 -5
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_attributes.d.ts +697 -30
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_attributes.js +697 -30
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_attributes.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_events.d.ts +6 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_events.js +6 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_events.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_metrics.d.ts +877 -49
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_metrics.js +877 -49
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_metrics.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/stable_attributes.d.ts +13 -4
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/stable_attributes.js +13 -4
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/stable_attributes.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/version.d.ts +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/version.js +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/version.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_attributes.d.ts +697 -30
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_attributes.js +697 -30
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_attributes.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_events.d.ts +6 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_events.js +6 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_events.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_metrics.d.ts +877 -49
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_metrics.js +877 -49
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_metrics.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/stable_attributes.d.ts +13 -4
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/stable_attributes.js +13 -4
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/stable_attributes.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/version.d.ts +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/version.js +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/version.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_attributes.d.ts +697 -30
- package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_attributes.js +729 -61
- package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_attributes.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_events.d.ts +6 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_events.js +7 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_events.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_metrics.d.ts +877 -49
- package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_metrics.js +886 -56
- package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_metrics.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/src/stable_attributes.d.ts +13 -4
- package/node_modules/@opentelemetry/semantic-conventions/build/src/stable_attributes.js +13 -4
- package/node_modules/@opentelemetry/semantic-conventions/build/src/stable_attributes.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/src/version.d.ts +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/src/version.js +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/src/version.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/package.json +3 -5
- package/node_modules/{pino → @pinojs/redact}/.github/dependabot.yml +1 -1
- package/node_modules/@pinojs/redact/.github/workflows/ci.yml +48 -0
- package/node_modules/@pinojs/redact/.github/workflows/publish-release.yml +43 -0
- package/node_modules/{pino/node_modules/sonic-boom → @pinojs/redact}/LICENSE +1 -1
- package/node_modules/@pinojs/redact/README.md +350 -0
- package/node_modules/@pinojs/redact/benchmarks/basic.js +184 -0
- package/node_modules/@pinojs/redact/eslint.config.js +1 -0
- package/node_modules/@pinojs/redact/index.d.ts +52 -0
- package/node_modules/@pinojs/redact/index.js +529 -0
- package/node_modules/@pinojs/redact/index.test-d.ts +22 -0
- package/node_modules/@pinojs/redact/package.json +37 -0
- package/node_modules/@pinojs/redact/scripts/sync-version.mjs +20 -0
- package/node_modules/@pinojs/redact/test/actual-redact-comparison.test.js +211 -0
- package/node_modules/@pinojs/redact/test/index.test.js +824 -0
- package/node_modules/@pinojs/redact/test/integration.test.js +390 -0
- package/node_modules/@pinojs/redact/test/multiple-wildcards.test.js +227 -0
- package/node_modules/@pinojs/redact/test/prototype-pollution.test.js +223 -0
- package/node_modules/@pinojs/redact/test/selective-clone.test.js +115 -0
- package/node_modules/@pinojs/redact/tsconfig.json +19 -0
- package/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/node/assert.d.ts +37 -2
- package/node_modules/@types/node/buffer.buffer.d.ts +9 -0
- package/node_modules/@types/node/buffer.d.ts +8 -4
- package/node_modules/@types/node/child_process.d.ts +65 -42
- package/node_modules/@types/node/cluster.d.ts +4 -5
- package/node_modules/@types/node/console.d.ts +3 -2
- package/node_modules/@types/node/crypto.d.ts +1079 -338
- package/node_modules/@types/node/dgram.d.ts +9 -8
- package/node_modules/@types/node/diagnostics_channel.d.ts +0 -2
- package/node_modules/@types/node/dns.d.ts +1 -1
- package/node_modules/@types/node/events.d.ts +1 -1
- package/node_modules/@types/node/fs/promises.d.ts +39 -21
- package/node_modules/@types/node/fs.d.ts +104 -87
- package/node_modules/@types/node/globals.d.ts +2 -0
- package/node_modules/@types/node/globals.typedarray.d.ts +19 -0
- package/node_modules/@types/node/http.d.ts +66 -27
- package/node_modules/@types/node/http2.d.ts +178 -52
- package/node_modules/@types/node/https.d.ts +91 -62
- package/node_modules/@types/node/index.d.ts +2 -0
- package/node_modules/@types/node/inspector.d.ts +24 -0
- package/node_modules/@types/node/inspector.generated.d.ts +181 -0
- package/node_modules/@types/node/net.d.ts +12 -11
- package/node_modules/@types/node/os.d.ts +14 -3
- package/node_modules/@types/node/package.json +3 -3
- package/node_modules/@types/node/perf_hooks.d.ts +6 -8
- package/node_modules/@types/node/process.d.ts +19 -23
- package/node_modules/@types/node/readline/promises.d.ts +1 -1
- package/node_modules/@types/node/sea.d.ts +9 -0
- package/node_modules/@types/node/sqlite.d.ts +226 -10
- package/node_modules/@types/node/stream/consumers.d.ts +2 -2
- package/node_modules/@types/node/stream/web.d.ts +6 -55
- package/node_modules/@types/node/stream.d.ts +38 -23
- package/node_modules/@types/node/string_decoder.d.ts +2 -2
- package/node_modules/@types/node/test.d.ts +29 -3
- package/node_modules/@types/node/tls.d.ts +90 -66
- package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +10 -2
- package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +16 -0
- package/node_modules/@types/node/ts5.6/index.d.ts +2 -0
- package/node_modules/@types/node/ts5.7/index.d.ts +2 -0
- package/node_modules/@types/node/url.d.ts +34 -10
- package/node_modules/@types/node/util.d.ts +12 -3
- package/node_modules/@types/node/v8.d.ts +38 -5
- package/node_modules/@types/node/vm.d.ts +169 -88
- package/node_modules/@types/node/wasi.d.ts +1 -1
- package/node_modules/@types/node/web-globals/crypto.d.ts +32 -0
- package/node_modules/@types/node/web-globals/streams.d.ts +22 -0
- package/node_modules/@types/node/worker_threads.d.ts +76 -1
- package/node_modules/@types/node/zlib.d.ts +25 -24
- package/node_modules/axios/CHANGELOG.md +410 -346
- package/node_modules/axios/README.md +79 -51
- package/node_modules/axios/dist/axios.js +121 -46
- package/node_modules/axios/dist/axios.js.map +1 -1
- package/node_modules/axios/dist/axios.min.js +2 -2
- package/node_modules/axios/dist/axios.min.js.map +1 -1
- package/node_modules/axios/dist/browser/axios.cjs +126 -57
- package/node_modules/axios/dist/browser/axios.cjs.map +1 -1
- package/node_modules/axios/dist/esm/axios.js +126 -57
- package/node_modules/axios/dist/esm/axios.js.map +1 -1
- package/node_modules/axios/dist/esm/axios.min.js +2 -2
- package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
- package/node_modules/axios/dist/node/axios.cjs +351 -97
- package/node_modules/axios/dist/node/axios.cjs.map +1 -1
- package/node_modules/axios/index.d.cts +4 -0
- package/node_modules/axios/index.d.ts +4 -0
- package/node_modules/axios/lib/adapters/adapters.js +85 -40
- package/node_modules/axios/lib/adapters/fetch.js +1 -1
- package/node_modules/axios/lib/adapters/http.js +224 -42
- package/node_modules/axios/lib/core/InterceptorManager.js +1 -1
- package/node_modules/axios/lib/core/mergeConfig.js +4 -4
- package/node_modules/axios/lib/env/data.js +1 -1
- package/node_modules/axios/lib/helpers/HttpStatusCode.js +6 -0
- package/node_modules/axios/lib/helpers/bind.js +7 -0
- package/node_modules/axios/lib/helpers/cookies.js +24 -13
- package/node_modules/axios/package.json +9 -4
- package/node_modules/detect-libc/lib/filesystem.js +1 -1
- package/node_modules/detect-libc/package.json +3 -1
- package/node_modules/form-data/CHANGELOG.md +60 -2
- package/node_modules/form-data/README.md +4 -4
- package/node_modules/form-data/lib/form_data.js +2 -2
- package/node_modules/form-data/package.json +4 -4
- package/node_modules/ipaddr.js/README.md +1 -0
- package/node_modules/ipaddr.js/ipaddr.min.js +1 -1
- package/node_modules/ipaddr.js/lib/ipaddr.js +11 -0
- package/node_modules/ipaddr.js/lib/ipaddr.js.d.ts +1 -0
- package/node_modules/ipaddr.js/package.json +2 -3
- package/node_modules/nan/.github/workflows/ci.yml +3 -1
- package/node_modules/nan/CHANGELOG.md +4 -1
- package/node_modules/nan/README.md +2 -2
- package/node_modules/nan/nan.h +25 -15
- package/node_modules/nan/nan_maybe_43_inl.h +5 -1
- package/node_modules/nan/package.json +2 -2
- package/node_modules/node-abi/abi_registry.json +19 -2
- package/node_modules/node-abi/package.json +3 -6
- package/node_modules/pino/CONTRIBUTING.md +4 -0
- package/node_modules/pino/LICENSE +1 -1
- package/node_modules/pino/README.md +20 -3
- package/node_modules/pino/benchmarks/basic.bench.js +1 -1
- package/node_modules/pino/benchmarks/child-child.bench.js +1 -1
- package/node_modules/pino/benchmarks/child-creation.bench.js +1 -1
- package/node_modules/pino/benchmarks/child.bench.js +1 -1
- package/node_modules/pino/benchmarks/deep-object.bench.js +1 -1
- package/node_modules/pino/benchmarks/internal/just-pino-heavy.bench.js +1 -1
- package/node_modules/pino/benchmarks/internal/just-pino.bench.js +1 -1
- package/node_modules/pino/benchmarks/internal/redact.bench.js +1 -1
- package/node_modules/pino/benchmarks/long-string.bench.js +1 -1
- package/node_modules/pino/benchmarks/multi-arg.bench.js +1 -1
- package/node_modules/pino/benchmarks/multistream.js +1 -1
- package/node_modules/pino/benchmarks/object.bench.js +1 -1
- package/node_modules/pino/benchmarks/utils/generate-benchmark-doc.js +2 -2
- package/node_modules/pino/benchmarks/utils/runbench.js +3 -3
- package/node_modules/pino/benchmarks/utils/wrap-log-level.js +2 -2
- package/node_modules/pino/browser.js +76 -36
- package/node_modules/pino/build/sync-version.js +18 -3
- package/node_modules/pino/docs/api.md +155 -13
- package/node_modules/pino/docs/browser.md +16 -1
- package/node_modules/pino/docs/bundling.md +5 -3
- package/node_modules/pino/docs/diagnostics.md +16 -0
- package/node_modules/pino/docs/ecosystem.md +15 -12
- package/node_modules/pino/docs/help.md +29 -3
- package/node_modules/pino/docs/lts.md +5 -4
- package/node_modules/pino/docs/transports.md +442 -271
- package/node_modules/pino/docs/web.md +59 -9
- package/node_modules/pino/eslint.config.js +19 -0
- package/node_modules/pino/examples/transport.js +2 -2
- package/node_modules/pino/file.js +1 -1
- package/node_modules/pino/lib/meta.js +1 -1
- package/node_modules/pino/lib/multistream.js +17 -2
- package/node_modules/pino/lib/proto.js +35 -11
- package/node_modules/pino/lib/redaction.js +9 -13
- package/node_modules/pino/lib/time.js +29 -1
- package/node_modules/pino/lib/tools.js +37 -8
- package/node_modules/pino/lib/transport-stream.js +10 -4
- package/node_modules/pino/lib/transport.js +23 -9
- package/node_modules/pino/lib/worker.js +164 -24
- package/node_modules/pino/package.json +28 -27
- package/node_modules/pino/pino.d.ts +244 -203
- package/node_modules/pino/pino.js +7 -3
- package/node_modules/pino/test/basic.test.js +181 -169
- package/node_modules/pino/test/broken-pipe.test.js +18 -16
- package/node_modules/pino/test/browser-child.test.js +26 -0
- package/node_modules/pino/test/browser-is-level-enabled.test.js +101 -0
- package/node_modules/pino/test/browser-serializers.test.js +0 -2
- package/node_modules/pino/test/browser-transmit.test.js +68 -0
- package/node_modules/pino/test/browser.test.js +98 -13
- package/node_modules/pino/test/complex-objects.test.js +8 -6
- package/node_modules/pino/test/crlf.test.js +7 -5
- package/node_modules/pino/test/custom-levels.test.js +80 -66
- package/node_modules/pino/test/diagnostics.test.js +107 -0
- package/node_modules/pino/test/error-key.test.js +37 -0
- package/node_modules/pino/test/error.test.js +48 -43
- package/node_modules/pino/test/escaping.test.js +8 -6
- package/node_modules/pino/test/esm/esm.mjs +5 -3
- package/node_modules/pino/test/esm/index.test.js +14 -27
- package/node_modules/pino/test/esm/named-exports.mjs +9 -8
- package/node_modules/pino/test/exit.test.js +18 -16
- package/node_modules/pino/test/fixtures/broken-pipe/basic.js +1 -1
- package/node_modules/pino/test/fixtures/broken-pipe/destination.js +1 -1
- package/node_modules/pino/test/fixtures/broken-pipe/syncfalse.js +1 -1
- package/node_modules/pino/test/fixtures/console-transport.js +1 -1
- package/node_modules/pino/test/fixtures/crashing-transport.js +13 -0
- package/node_modules/pino/test/fixtures/default-exit.js +1 -1
- package/node_modules/pino/test/fixtures/destination-exit.js +1 -1
- package/node_modules/pino/test/fixtures/noop-transport.js +1 -1
- package/node_modules/pino/test/fixtures/pretty/null-prototype.js +1 -1
- package/node_modules/pino/test/fixtures/stdout-hack-protection.js +1 -1
- package/node_modules/pino/test/fixtures/syncfalse-child.js +1 -1
- package/node_modules/pino/test/fixtures/syncfalse-exit.js +1 -1
- package/node_modules/pino/test/fixtures/syncfalse-flush-exit.js +1 -1
- package/node_modules/pino/test/fixtures/syncfalse.js +1 -1
- package/node_modules/pino/test/fixtures/syntax-error-esm.mjs +2 -0
- package/node_modules/pino/test/fixtures/to-file-transport-with-transform.js +3 -3
- package/node_modules/pino/test/fixtures/to-file-transport.js +2 -2
- package/node_modules/pino/test/fixtures/to-file-transport.mjs +2 -2
- package/node_modules/pino/test/fixtures/transport/index.js +2 -2
- package/node_modules/pino/test/fixtures/transport-main.js +1 -1
- package/node_modules/pino/test/fixtures/transport-transform.js +1 -1
- package/node_modules/pino/test/fixtures/transport-uses-pino-config.js +1 -1
- package/node_modules/pino/test/fixtures/transport-worker-data.js +1 -1
- package/node_modules/pino/test/fixtures/transport-worker.js +2 -2
- package/node_modules/pino/test/fixtures/ts/to-file-transport-with-transform.ts +3 -3
- package/node_modules/pino/test/fixtures/ts/to-file-transport.ts +2 -2
- package/node_modules/pino/test/fixtures/ts/transpile.cjs +1 -1
- package/node_modules/pino/test/fixtures/ts/transport-exit-immediately-with-async-dest.ts +1 -1
- package/node_modules/pino/test/fixtures/ts/transport-main.ts +1 -1
- package/node_modules/pino/test/fixtures/ts/transport-worker.ts +1 -1
- package/node_modules/pino/test/formatters.test.js +46 -37
- package/node_modules/pino/test/helper.d.ts +1 -1
- package/node_modules/pino/test/helper.js +37 -10
- package/node_modules/pino/test/hooks.test.js +45 -28
- package/node_modules/pino/test/http.test.js +39 -67
- package/node_modules/pino/test/internals/version.test.js +11 -9
- package/node_modules/pino/test/is-level-enabled.test.js +66 -72
- package/node_modules/pino/test/levels.test.js +245 -141
- package/node_modules/pino/test/metadata.test.js +45 -31
- package/node_modules/pino/test/mixin-merge-strategy.test.js +9 -7
- package/node_modules/pino/test/mixin.test.js +63 -40
- package/node_modules/pino/test/multistream.test.js +174 -118
- package/node_modules/pino/test/redact.test.js +172 -126
- package/node_modules/pino/test/serializers.test.js +61 -57
- package/node_modules/pino/test/stdout-protection.test.js +14 -12
- package/node_modules/pino/test/syncfalse.test.js +29 -34
- package/node_modules/pino/test/timestamp-nano.test.js +37 -0
- package/node_modules/pino/test/timestamp.test.js +37 -34
- package/node_modules/pino/test/transport/big.test.js +11 -12
- package/node_modules/pino/test/transport/bundlers-support.test.js +15 -43
- package/node_modules/pino/test/transport/caller.test.js +9 -8
- package/node_modules/pino/test/transport/core.test.js +175 -145
- package/node_modules/pino/test/transport/core.transpiled.test.ts +17 -19
- package/node_modules/pino/test/transport/crash.test.js +36 -0
- package/node_modules/pino/test/transport/module-link.test.js +21 -19
- package/node_modules/pino/test/transport/pipeline.test.js +109 -8
- package/node_modules/pino/test/transport/repl.test.js +4 -3
- package/node_modules/pino/test/transport/{syncfalse.test.js → sync-false.test.js} +14 -12
- package/node_modules/pino/test/transport/sync-true.test.js +57 -0
- package/node_modules/pino/test/transport/targets.test.js +25 -5
- package/node_modules/pino/test/transport/uses-pino-config.test.js +16 -17
- package/node_modules/pino/test/transport-stream.test.js +40 -0
- package/node_modules/pino/test/types/{pino-import.test-d.ts → pino-import.test-d.cts} +4 -3
- package/node_modules/pino/test/types/pino-multistream.test-d.ts +1 -1
- package/node_modules/pino/test/types/pino-top-export.test-d.ts +1 -0
- package/node_modules/pino/test/types/pino-transport.test-d.ts +1 -1
- package/node_modules/pino/test/types/pino-type-only.test-d.ts +24 -6
- package/node_modules/pino/test/types/pino.test-d.ts +161 -6
- package/node_modules/pino/test/types/pino.ts +31 -19
- package/node_modules/pino/tsconfig.json +1 -1
- package/node_modules/pino-abstract-transport/.github/workflows/ci.yml +2 -4
- package/node_modules/pino-abstract-transport/index.js +1 -1
- package/node_modules/pino-abstract-transport/package.json +2 -3
- package/node_modules/pino-abstract-transport/test/base.test.js +1 -1
- package/node_modules/pino-abstract-transport/test/worker.test.js +7 -14
- package/node_modules/pino-std-serializers/.github/workflows/ci.yml +5 -5
- package/node_modules/pino-std-serializers/Readme.md +1 -0
- package/node_modules/pino-std-serializers/package.json +9 -8
- package/node_modules/pino-std-serializers/test/err-with-cause.test.js +72 -88
- package/node_modules/pino-std-serializers/test/err.test.js +76 -91
- package/node_modules/pino-std-serializers/test/req.test.js +142 -98
- package/node_modules/pino-std-serializers/test/res.test.js +42 -31
- package/node_modules/process-warning/.github/dependabot.yml +1 -1
- package/node_modules/process-warning/.github/workflows/ci.yml +1 -2
- package/node_modules/process-warning/README.md +4 -4
- package/node_modules/process-warning/eslint.config.js +6 -0
- package/node_modules/process-warning/package.json +39 -8
- package/node_modules/process-warning/test/emit-interpolated-string.test.js +11 -6
- package/node_modules/process-warning/test/emit-once-only.test.js +11 -6
- package/node_modules/process-warning/test/emit-reset.test.js +10 -6
- package/node_modules/process-warning/test/emit-set.test.js +10 -5
- package/node_modules/process-warning/test/emit-unlimited.test.js +12 -7
- package/node_modules/process-warning/test/index.test.js +20 -20
- package/node_modules/process-warning/test/issue-88.test.js +8 -3
- package/node_modules/process-warning/test/jest.test.js +17 -15
- package/node_modules/process-warning/test/no-warnings.test.js +9 -9
- package/node_modules/process-warning/test/promise.js +10 -0
- package/node_modules/process-warning/types/index.d.ts +5 -5
- package/node_modules/semver/classes/range.js +1 -0
- package/node_modules/semver/classes/semver.js +19 -5
- package/node_modules/semver/internal/identifiers.js +4 -0
- package/node_modules/semver/package.json +3 -3
- package/node_modules/thread-stream/.github/workflows/ci.yml +4 -8
- package/node_modules/thread-stream/index.d.ts +4 -5
- package/node_modules/thread-stream/lib/worker.js +5 -2
- package/node_modules/thread-stream/package.json +6 -4
- package/node_modules/thread-stream/test/base.test.js +12 -0
- package/node_modules/thread-stream/test/never-drain.test.js +3 -1
- package/node_modules/thread-stream/test/pkg/pkg.test.js +2 -0
- package/node_modules/thread-stream/test/syntax-error.mjs +2 -0
- package/node_modules/thread-stream/tsconfig.json +8 -0
- package/node_modules/undici-types/agent.d.ts +1 -0
- package/node_modules/undici-types/diagnostics-channel.d.ts +0 -1
- package/node_modules/undici-types/errors.d.ts +5 -15
- package/node_modules/undici-types/eventsource.d.ts +6 -1
- package/node_modules/undici-types/index.d.ts +4 -1
- package/node_modules/undici-types/interceptors.d.ts +5 -0
- package/node_modules/undici-types/package.json +1 -1
- package/node_modules/undici-types/snapshot-agent.d.ts +5 -3
- package/node_modules/undici-types/webidl.d.ts +82 -21
- package/node_modules/yaml/browser/dist/compose/compose-collection.js +1 -1
- package/node_modules/yaml/browser/dist/compose/resolve-block-seq.js +1 -1
- package/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js +2 -2
- package/node_modules/yaml/browser/dist/errors.js +1 -1
- package/node_modules/yaml/browser/dist/nodes/Alias.js +1 -1
- package/node_modules/yaml/browser/dist/parse/parser.js +2 -2
- package/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +1 -1
- package/node_modules/yaml/browser/dist/stringify/stringifyPair.js +1 -1
- package/node_modules/yaml/dist/compose/compose-collection.js +1 -1
- package/node_modules/yaml/dist/compose/resolve-block-seq.js +1 -1
- package/node_modules/yaml/dist/compose/resolve-flow-collection.js +2 -2
- package/node_modules/yaml/dist/errors.js +1 -1
- package/node_modules/yaml/dist/nodes/Alias.js +1 -1
- package/node_modules/yaml/dist/parse/parser.js +2 -2
- package/node_modules/yaml/dist/stringify/stringifyNumber.js +1 -1
- package/node_modules/yaml/dist/stringify/stringifyPair.js +1 -1
- package/node_modules/yaml/package.json +4 -4
- package/package.json +3 -3
- package/node_modules/@contrast/protect/lib/input-analysis/install/koa-body5.js +0 -63
- package/node_modules/@contrast/protect/lib/input-analysis/install/koa-bodyparser4.js +0 -64
- package/node_modules/@contrast/route-coverage/lib/install/express/express4.js +0 -157
- package/node_modules/@contrast/route-coverage/lib/install/express/express5.js +0 -538
- package/node_modules/abort-controller/LICENSE +0 -21
- package/node_modules/abort-controller/README.md +0 -98
- package/node_modules/abort-controller/browser.js +0 -13
- package/node_modules/abort-controller/browser.mjs +0 -11
- package/node_modules/abort-controller/dist/abort-controller.d.ts +0 -43
- package/node_modules/abort-controller/dist/abort-controller.js +0 -127
- package/node_modules/abort-controller/dist/abort-controller.js.map +0 -1
- package/node_modules/abort-controller/dist/abort-controller.mjs +0 -118
- package/node_modules/abort-controller/dist/abort-controller.mjs.map +0 -1
- package/node_modules/abort-controller/dist/abort-controller.umd.js +0 -5
- package/node_modules/abort-controller/dist/abort-controller.umd.js.map +0 -1
- package/node_modules/abort-controller/package.json +0 -97
- package/node_modules/abort-controller/polyfill.js +0 -21
- package/node_modules/abort-controller/polyfill.mjs +0 -19
- package/node_modules/base64-js/LICENSE +0 -21
- package/node_modules/base64-js/README.md +0 -34
- package/node_modules/base64-js/base64js.min.js +0 -1
- package/node_modules/base64-js/index.d.ts +0 -3
- package/node_modules/base64-js/index.js +0 -150
- package/node_modules/base64-js/package.json +0 -47
- package/node_modules/buffer/AUTHORS.md +0 -73
- package/node_modules/buffer/LICENSE +0 -21
- package/node_modules/buffer/README.md +0 -410
- package/node_modules/buffer/index.d.ts +0 -194
- package/node_modules/buffer/index.js +0 -2106
- package/node_modules/buffer/package.json +0 -93
- package/node_modules/event-target-shim/LICENSE +0 -22
- package/node_modules/event-target-shim/README.md +0 -293
- package/node_modules/event-target-shim/dist/event-target-shim.js +0 -871
- package/node_modules/event-target-shim/dist/event-target-shim.js.map +0 -1
- package/node_modules/event-target-shim/dist/event-target-shim.mjs +0 -862
- package/node_modules/event-target-shim/dist/event-target-shim.mjs.map +0 -1
- package/node_modules/event-target-shim/dist/event-target-shim.umd.js +0 -6
- package/node_modules/event-target-shim/dist/event-target-shim.umd.js.map +0 -1
- package/node_modules/event-target-shim/index.d.ts +0 -399
- package/node_modules/event-target-shim/package.json +0 -82
- package/node_modules/events/.airtap.yml +0 -15
- package/node_modules/events/.github/FUNDING.yml +0 -12
- package/node_modules/events/.travis.yml +0 -18
- package/node_modules/events/History.md +0 -118
- package/node_modules/events/LICENSE +0 -22
- package/node_modules/events/Readme.md +0 -50
- package/node_modules/events/events.js +0 -497
- package/node_modules/events/package.json +0 -37
- package/node_modules/events/security.md +0 -10
- package/node_modules/events/tests/add-listeners.js +0 -111
- package/node_modules/events/tests/check-listener-leaks.js +0 -101
- package/node_modules/events/tests/common.js +0 -104
- package/node_modules/events/tests/errors.js +0 -13
- package/node_modules/events/tests/events-list.js +0 -28
- package/node_modules/events/tests/events-once.js +0 -234
- package/node_modules/events/tests/index.js +0 -64
- package/node_modules/events/tests/legacy-compat.js +0 -16
- package/node_modules/events/tests/listener-count.js +0 -37
- package/node_modules/events/tests/listeners-side-effects.js +0 -56
- package/node_modules/events/tests/listeners.js +0 -168
- package/node_modules/events/tests/max-listeners.js +0 -47
- package/node_modules/events/tests/method-names.js +0 -35
- package/node_modules/events/tests/modify-in-emit.js +0 -90
- package/node_modules/events/tests/num-args.js +0 -60
- package/node_modules/events/tests/once.js +0 -83
- package/node_modules/events/tests/prepend.js +0 -31
- package/node_modules/events/tests/remove-all-listeners.js +0 -133
- package/node_modules/events/tests/remove-listeners.js +0 -212
- package/node_modules/events/tests/set-max-listeners-side-effects.js +0 -31
- package/node_modules/events/tests/special-event-names.js +0 -45
- package/node_modules/events/tests/subclass.js +0 -66
- package/node_modules/events/tests/symbols.js +0 -25
- package/node_modules/fast-redact/.github/workflows/ci.yml +0 -37
- package/node_modules/fast-redact/LICENSE +0 -21
- package/node_modules/fast-redact/benchmark/index.js +0 -223
- package/node_modules/fast-redact/example/default-usage.js +0 -14
- package/node_modules/fast-redact/example/intermediate-wildcard-array.js +0 -11
- package/node_modules/fast-redact/example/multi-wildcard-array-depth.js +0 -11
- package/node_modules/fast-redact/example/multi-wildcard-array-end.js +0 -11
- package/node_modules/fast-redact/example/multi-wildcard-array.js +0 -11
- package/node_modules/fast-redact/example/serialize-false.js +0 -11
- package/node_modules/fast-redact/example/serialize-function.js +0 -4
- package/node_modules/fast-redact/example/top-wildcard-object.js +0 -9
- package/node_modules/fast-redact/index.js +0 -56
- package/node_modules/fast-redact/lib/modifiers.js +0 -291
- package/node_modules/fast-redact/lib/parse.js +0 -44
- package/node_modules/fast-redact/lib/redactor.js +0 -108
- package/node_modules/fast-redact/lib/restorer.js +0 -92
- package/node_modules/fast-redact/lib/rx.js +0 -16
- package/node_modules/fast-redact/lib/state.js +0 -20
- package/node_modules/fast-redact/lib/validator.js +0 -33
- package/node_modules/fast-redact/package.json +0 -50
- package/node_modules/fast-redact/readme.md +0 -282
- package/node_modules/fast-redact/test/index.js +0 -1502
- package/node_modules/ieee754/LICENSE +0 -11
- package/node_modules/ieee754/README.md +0 -51
- package/node_modules/ieee754/index.d.ts +0 -10
- package/node_modules/ieee754/index.js +0 -85
- package/node_modules/ieee754/package.json +0 -52
- package/node_modules/pino/.eslintignore +0 -2
- package/node_modules/pino/.eslintrc +0 -8
- package/node_modules/pino/.github/workflows/bench.yml +0 -61
- package/node_modules/pino/.github/workflows/ci.yml +0 -86
- package/node_modules/pino/.github/workflows/lock-threads.yml +0 -30
- package/node_modules/pino/.github/workflows/package-manager-ci.yml +0 -99
- package/node_modules/pino/.github/workflows/target-main.yml +0 -23
- package/node_modules/pino/.taprc.yaml +0 -8
- package/node_modules/pino/docsify/sidebar.md +0 -26
- package/node_modules/pino/favicon-16x16.png +0 -0
- package/node_modules/pino/favicon-32x32.png +0 -0
- package/node_modules/pino/lib/worker-pipeline.js +0 -38
- package/node_modules/pino/node_modules/sonic-boom/.eslintignore +0 -2
- package/node_modules/pino/node_modules/sonic-boom/.husky/pre-commit +0 -4
- package/node_modules/pino/node_modules/sonic-boom/.taprc.yaml +0 -11
- package/node_modules/pino/node_modules/sonic-boom/README.md +0 -151
- package/node_modules/pino/node_modules/sonic-boom/bench.js +0 -98
- package/node_modules/pino/node_modules/sonic-boom/check.js +0 -18
- package/node_modules/pino/node_modules/sonic-boom/example.js +0 -8
- package/node_modules/pino/node_modules/sonic-boom/fixtures/firehose.js +0 -22
- package/node_modules/pino/node_modules/sonic-boom/index.js +0 -690
- package/node_modules/pino/node_modules/sonic-boom/package.json +0 -50
- package/node_modules/pino/node_modules/sonic-boom/test/destroy.test.js +0 -49
- package/node_modules/pino/node_modules/sonic-boom/test/end.test.js +0 -98
- package/node_modules/pino/node_modules/sonic-boom/test/flush-sync.test.js +0 -140
- package/node_modules/pino/node_modules/sonic-boom/test/flush.test.js +0 -419
- package/node_modules/pino/node_modules/sonic-boom/test/fsync.test.js +0 -63
- package/node_modules/pino/node_modules/sonic-boom/test/helper.js +0 -42
- package/node_modules/pino/node_modules/sonic-boom/test/minlength.test.js +0 -35
- package/node_modules/pino/node_modules/sonic-boom/test/mode.test.js +0 -116
- package/node_modules/pino/node_modules/sonic-boom/test/reopen.test.js +0 -239
- package/node_modules/pino/node_modules/sonic-boom/test/retry.test.js +0 -414
- package/node_modules/pino/node_modules/sonic-boom/test/sync.test.js +0 -261
- package/node_modules/pino/node_modules/sonic-boom/test/write.test.js +0 -465
- package/node_modules/pino/node_modules/sonic-boom/types/index.d.ts +0 -62
- package/node_modules/pino/node_modules/sonic-boom/types/tests/test.ts +0 -4
- package/node_modules/pino/pino-banner.png +0 -0
- package/node_modules/pino/pino-logo-hire.png +0 -0
- package/node_modules/pino/pino-tree.png +0 -0
- package/node_modules/pino/pretty-demo.png +0 -0
- package/node_modules/pino/test/errorKey.test.js +0 -34
- package/node_modules/pino/test/transport/core.test.ts +0 -236
- package/node_modules/pino-std-serializers/.taprc +0 -2
- package/node_modules/process/.eslintrc +0 -21
- package/node_modules/process/LICENSE +0 -22
- package/node_modules/process/README.md +0 -26
- package/node_modules/process/browser.js +0 -184
- package/node_modules/process/index.js +0 -2
- package/node_modules/process/package.json +0 -27
- package/node_modules/process/test.js +0 -199
- package/node_modules/process-warning/.taprc +0 -2
- package/node_modules/readable-stream/LICENSE +0 -47
- package/node_modules/readable-stream/README.md +0 -116
- package/node_modules/readable-stream/lib/_stream_duplex.js +0 -4
- package/node_modules/readable-stream/lib/_stream_passthrough.js +0 -4
- package/node_modules/readable-stream/lib/_stream_readable.js +0 -4
- package/node_modules/readable-stream/lib/_stream_transform.js +0 -4
- package/node_modules/readable-stream/lib/_stream_writable.js +0 -4
- package/node_modules/readable-stream/lib/internal/streams/add-abort-signal.js +0 -52
- package/node_modules/readable-stream/lib/internal/streams/buffer_list.js +0 -157
- package/node_modules/readable-stream/lib/internal/streams/compose.js +0 -194
- package/node_modules/readable-stream/lib/internal/streams/destroy.js +0 -290
- package/node_modules/readable-stream/lib/internal/streams/duplex.js +0 -143
- package/node_modules/readable-stream/lib/internal/streams/duplexify.js +0 -378
- package/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +0 -286
- package/node_modules/readable-stream/lib/internal/streams/from.js +0 -98
- package/node_modules/readable-stream/lib/internal/streams/lazy_transform.js +0 -51
- package/node_modules/readable-stream/lib/internal/streams/legacy.js +0 -89
- package/node_modules/readable-stream/lib/internal/streams/operators.js +0 -457
- package/node_modules/readable-stream/lib/internal/streams/passthrough.js +0 -39
- package/node_modules/readable-stream/lib/internal/streams/pipeline.js +0 -471
- package/node_modules/readable-stream/lib/internal/streams/readable.js +0 -1290
- package/node_modules/readable-stream/lib/internal/streams/state.js +0 -39
- package/node_modules/readable-stream/lib/internal/streams/transform.js +0 -180
- package/node_modules/readable-stream/lib/internal/streams/utils.js +0 -327
- package/node_modules/readable-stream/lib/internal/streams/writable.js +0 -819
- package/node_modules/readable-stream/lib/internal/validators.js +0 -530
- package/node_modules/readable-stream/lib/ours/browser.js +0 -35
- package/node_modules/readable-stream/lib/ours/errors.js +0 -343
- package/node_modules/readable-stream/lib/ours/index.js +0 -65
- package/node_modules/readable-stream/lib/ours/primordials.js +0 -124
- package/node_modules/readable-stream/lib/ours/util/inspect.js +0 -55
- package/node_modules/readable-stream/lib/ours/util.js +0 -148
- package/node_modules/readable-stream/lib/stream/promises.js +0 -43
- package/node_modules/readable-stream/lib/stream.js +0 -143
- package/node_modules/readable-stream/package.json +0 -88
- package/node_modules/safe-buffer/LICENSE +0 -21
- package/node_modules/safe-buffer/README.md +0 -584
- package/node_modules/safe-buffer/index.d.ts +0 -187
- package/node_modules/safe-buffer/index.js +0 -65
- package/node_modules/safe-buffer/package.json +0 -51
- package/node_modules/string_decoder/LICENSE +0 -48
- package/node_modules/string_decoder/README.md +0 -47
- package/node_modules/string_decoder/lib/string_decoder.js +0 -296
- package/node_modules/string_decoder/package.json +0 -34
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
* [logger\[Symbol.for('pino.serializers')\]](#serializers)
|
|
23
23
|
* [Event: 'level-change'](#level-change)
|
|
24
24
|
* [logger.version](#version)
|
|
25
|
+
* [logger.msgPrefix](#msgPrefix)
|
|
25
26
|
* [Statics](#statics)
|
|
26
27
|
* [pino.destination()](#pino-destination)
|
|
27
28
|
* [pino.transport()](#pino-transport)
|
|
@@ -36,6 +37,9 @@
|
|
|
36
37
|
* [DestinationStream](#destinationstream)
|
|
37
38
|
* [Types](#types)
|
|
38
39
|
* [Level](#level-1)
|
|
40
|
+
* [TypeScript](#typescript)
|
|
41
|
+
* [Module Augmentation](#module-augmentation)
|
|
42
|
+
* [LogFnFields Interface](#logfnfields-interface)
|
|
39
43
|
|
|
40
44
|
<a id="export"></a>
|
|
41
45
|
## `pino([options], [destination]) => logger`
|
|
@@ -241,13 +245,13 @@ child.info('this will have both `foo: 1` and `bar: 2`')
|
|
|
241
245
|
logger.info('this will still only have `foo: 1`')
|
|
242
246
|
```
|
|
243
247
|
|
|
244
|
-
As of pino 7.x, when the `mixin` is used with the [`nestedKey` option](#opt-nestedkey),
|
|
245
|
-
the object returned from the `mixin` method will also be nested. Prior versions would mix
|
|
246
|
-
this object into the root.
|
|
248
|
+
As of pino 7.x, when the `mixin` is used with the [`nestedKey` option](#opt-nestedkey),
|
|
249
|
+
the object returned from the `mixin` method will also be nested. Prior versions would mix
|
|
250
|
+
this object into the root.
|
|
247
251
|
|
|
248
252
|
```js
|
|
249
253
|
const logger = pino({
|
|
250
|
-
nestedKey: 'payload',
|
|
254
|
+
nestedKey: 'payload',
|
|
251
255
|
mixin() {
|
|
252
256
|
return { requestId: requestId.currentId() }
|
|
253
257
|
}
|
|
@@ -375,6 +379,23 @@ const hooks = {
|
|
|
375
379
|
}
|
|
376
380
|
```
|
|
377
381
|
|
|
382
|
+
|
|
383
|
+
<a id="streamWrite"></a>
|
|
384
|
+
##### `streamWrite`
|
|
385
|
+
|
|
386
|
+
Allows for manipulating the _stringified_ JSON log data just before writing to various transports.
|
|
387
|
+
|
|
388
|
+
The method receives the stringified JSON and must return valid stringified JSON.
|
|
389
|
+
|
|
390
|
+
For example:
|
|
391
|
+
```js
|
|
392
|
+
const hooks = {
|
|
393
|
+
streamWrite (s) {
|
|
394
|
+
return s.replaceAll('sensitive-api-key', 'XXX')
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
```
|
|
398
|
+
|
|
378
399
|
<a id=opt-formatters></a>
|
|
379
400
|
#### `formatters` (Object)
|
|
380
401
|
|
|
@@ -467,7 +488,7 @@ child.info('User authenticated!')
|
|
|
467
488
|
<a id=opt-base></a>
|
|
468
489
|
#### `base` (Object)
|
|
469
490
|
|
|
470
|
-
Default: `{pid: process.pid, hostname: os.hostname}`
|
|
491
|
+
Default: `{pid: process.pid, hostname: os.hostname()}`
|
|
471
492
|
|
|
472
493
|
Key-value object added as child logger to each log line.
|
|
473
494
|
|
|
@@ -590,7 +611,7 @@ when using the `transport` option. In this case, an `Error` will be thrown.
|
|
|
590
611
|
|
|
591
612
|
#### `onChild` (Function)
|
|
592
613
|
|
|
593
|
-
The `onChild` function is a synchronous callback that will be called on each creation of a new child, passing the child instance as its first argument.
|
|
614
|
+
The `onChild` function is a synchronous callback that will be called on each creation of a new child, passing the child instance as its first argument.
|
|
594
615
|
Any error thrown inside the callback will be uncaught and should be handled inside the callback.
|
|
595
616
|
```js
|
|
596
617
|
const parent = require('pino')({ onChild: (instance) => {
|
|
@@ -609,7 +630,7 @@ Default: `pino.destination(1)` (STDOUT)
|
|
|
609
630
|
The `destination` parameter can be a file descriptor, a file path, or an
|
|
610
631
|
object with `dest` property pointing to a fd or path.
|
|
611
632
|
An ordinary Node.js `stream` file descriptor can be passed as the
|
|
612
|
-
destination (such as the result
|
|
633
|
+
destination (such as the result
|
|
613
634
|
of `fs.createWriteStream`) but for peak log writing performance, it is strongly
|
|
614
635
|
recommended to use `pino.destination` to create the destination stream.
|
|
615
636
|
Note that the `destination` parameter can be the result of `pino.transport()`.
|
|
@@ -739,7 +760,7 @@ from `msg` to another string as preferred.
|
|
|
739
760
|
The `message` string may contain a printf style string with support for
|
|
740
761
|
the following placeholders:
|
|
741
762
|
|
|
742
|
-
* `%s` – string placeholder
|
|
763
|
+
* `%s` – string placeholder, every non-string value passed in will have `.toString()` called.
|
|
743
764
|
* `%d` – digit placeholder
|
|
744
765
|
* `%O`, `%o`, and `%j` – object placeholder
|
|
745
766
|
|
|
@@ -926,6 +947,7 @@ const child = logger.child({foo: 'bar'}, {level: 'debug'})
|
|
|
926
947
|
child.debug('debug!') // will log as the `level` property set the level to debug
|
|
927
948
|
```
|
|
928
949
|
|
|
950
|
+
<a id="options-msgPrefix"></a>
|
|
929
951
|
##### `options.msgPrefix` (String)
|
|
930
952
|
|
|
931
953
|
Default: `undefined`
|
|
@@ -1001,7 +1023,7 @@ Adds to the bindings of this logger instance.
|
|
|
1001
1023
|
**Note:** Does not overwrite bindings. Can potentially result in duplicate keys in
|
|
1002
1024
|
log lines.
|
|
1003
1025
|
|
|
1004
|
-
* See [`bindings` parameter in `logger.child`](#logger-child-bindings)
|
|
1026
|
+
* See [`bindings` parameter in `logger.child`](#logger-child-bindings)
|
|
1005
1027
|
|
|
1006
1028
|
<a id="flush"></a>
|
|
1007
1029
|
### `logger.flush([cb])`
|
|
@@ -1157,6 +1179,13 @@ Exposes the Pino package version. Also available on the exported `pino` function
|
|
|
1157
1179
|
|
|
1158
1180
|
* See [`pino.version`](#pino-version)
|
|
1159
1181
|
|
|
1182
|
+
<a id="msgPrefix"></a>
|
|
1183
|
+
### `logger.msgPrefix` (String|Undefined)
|
|
1184
|
+
|
|
1185
|
+
Exposes the cumulative `msgPrefix` of the logger.
|
|
1186
|
+
|
|
1187
|
+
* See [`options.msgPrefix`](#options-msgPrefix)
|
|
1188
|
+
|
|
1160
1189
|
## Statics
|
|
1161
1190
|
|
|
1162
1191
|
<a id="pino-destination"></a>
|
|
@@ -1239,6 +1268,30 @@ const transport = pino.transport({
|
|
|
1239
1268
|
pino(transport)
|
|
1240
1269
|
```
|
|
1241
1270
|
|
|
1271
|
+
Multiple transports can now be defined to include pipelines:
|
|
1272
|
+
|
|
1273
|
+
```js
|
|
1274
|
+
const pino = require('pino')
|
|
1275
|
+
const transport = pino.transport({
|
|
1276
|
+
targets: [{
|
|
1277
|
+
level: 'info',
|
|
1278
|
+
target: 'pino-pretty' // must be installed separately
|
|
1279
|
+
}, {
|
|
1280
|
+
level: 'trace',
|
|
1281
|
+
target: 'pino/file',
|
|
1282
|
+
options: { destination: '/path/to/store/logs' }
|
|
1283
|
+
}, {
|
|
1284
|
+
pipeline: [{
|
|
1285
|
+
target: 'pino-syslog' // must be installed separately
|
|
1286
|
+
}, {
|
|
1287
|
+
target: 'pino-socket' // must be installed separately
|
|
1288
|
+
}]
|
|
1289
|
+
}
|
|
1290
|
+
]
|
|
1291
|
+
})
|
|
1292
|
+
pino(transport)
|
|
1293
|
+
```
|
|
1294
|
+
|
|
1242
1295
|
If `WeakRef`, `WeakMap`, and `FinalizationRegistry` are available in the current runtime (v14.5.0+), then the thread
|
|
1243
1296
|
will be automatically terminated in case the stream or logger goes out of scope.
|
|
1244
1297
|
The `transport()` function adds a listener to `process.on('beforeExit')` and `process.on('exit')` to ensure the worker
|
|
@@ -1266,6 +1319,9 @@ module.exports = function build () {
|
|
|
1266
1319
|
}
|
|
1267
1320
|
```
|
|
1268
1321
|
|
|
1322
|
+
Note that _any `'error'`_ event emitted by the transport must be considered a fatal error and the process must be terminated.
|
|
1323
|
+
Error events are not recoverable.
|
|
1324
|
+
|
|
1269
1325
|
For more on transports, how they work, and how to create them see the [`Transports documentation`](/docs/transports.md).
|
|
1270
1326
|
|
|
1271
1327
|
* See [`Transports`](/docs/transports.md)
|
|
@@ -1276,7 +1332,7 @@ For more on transports, how they work, and how to create them see the [`Transpor
|
|
|
1276
1332
|
* `target`: The transport to pass logs through. This may be an installed module name or an absolute path.
|
|
1277
1333
|
* `options`: An options object which is serialized (see [Structured Clone Algorithm](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm)), passed to the worker thread, parsed and then passed to the exported transport function.
|
|
1278
1334
|
* `worker`: [Worker thread](https://nodejs.org/api/worker_threads.html#worker_threads_new_worker_filename_options) configuration options. Additionally, the `worker` option supports `worker.autoEnd`. If this is set to `false` logs will not be flushed on process exit. It is then up to the developer to call `transport.end()` to flush logs.
|
|
1279
|
-
* `targets`: May be specified instead of `target`. Must be an array of transport configurations. Transport configurations include the aforementioned `options` and `target` options plus a `level` option which will send only logs above a specified level to a transport.
|
|
1335
|
+
* `targets`: May be specified instead of `target`. Must be an array of transport configurations and/or pipelines. Transport configurations include the aforementioned `options` and `target` options plus a `level` option which will send only logs above a specified level to a transport.
|
|
1280
1336
|
* `pipeline`: May be specified instead of `target`. Must be an array of transport configurations. Transport configurations include the aforementioned `options` and `target` options. All intermediate steps in the pipeline _must_ be `Transform` streams and not `Writable`.
|
|
1281
1337
|
* `dedupe`: See [pino.multistream options](#pino-multistream)
|
|
1282
1338
|
|
|
@@ -1288,7 +1344,7 @@ Create a stream composed by multiple destination streams and returns an
|
|
|
1288
1344
|
object implementing the [MultiStreamRes](#multistreamres) interface.
|
|
1289
1345
|
|
|
1290
1346
|
```js
|
|
1291
|
-
var fs = require('fs')
|
|
1347
|
+
var fs = require('node:fs')
|
|
1292
1348
|
var pino = require('pino')
|
|
1293
1349
|
var pretty = require('pino-pretty')
|
|
1294
1350
|
var streams = [
|
|
@@ -1370,6 +1426,7 @@ The `pino.stdTimeFunctions` object provides a very small set of common functions
|
|
|
1370
1426
|
* `pino.stdTimeFunctions.unixTime`: Seconds since Unix epoch
|
|
1371
1427
|
* `pino.stdTimeFunctions.nullTime`: Clears timestamp property (Used when `timestamp: false`)
|
|
1372
1428
|
* `pino.stdTimeFunctions.isoTime`: ISO 8601-formatted time in UTC
|
|
1429
|
+
* `pino.stdTimeFunctions.isoTimeNano`: RFC 3339-formatted time in UTC with nanosecond precision
|
|
1373
1430
|
|
|
1374
1431
|
* See [`timestamp` option](#opt-timestamp)
|
|
1375
1432
|
|
|
@@ -1408,14 +1465,24 @@ Exposes the Pino package version. Also available on the logger instance.
|
|
|
1408
1465
|
- Returns: [MultiStreamRes](#multistreamres)
|
|
1409
1466
|
|
|
1410
1467
|
Add `dest` stream to the array of streams of the current instance.
|
|
1411
|
-
*
|
|
1412
|
-
|
|
1468
|
+
* `flushSync()`
|
|
1469
|
+
- Returns: `undefined`
|
|
1413
1470
|
|
|
1414
1471
|
Call `flushSync` on each stream held by the current instance.
|
|
1472
|
+
|
|
1473
|
+
* `lastId`
|
|
1474
|
+
- number
|
|
1475
|
+
|
|
1476
|
+
The ID assigned to the last stream assigned to the current instance.
|
|
1415
1477
|
* `minLevel`
|
|
1416
1478
|
- number
|
|
1417
1479
|
|
|
1418
1480
|
The minimum level amongst all the streams held by the current instance.
|
|
1481
|
+
|
|
1482
|
+
* `remove(id)`
|
|
1483
|
+
- `id` [number]
|
|
1484
|
+
|
|
1485
|
+
Removes a stream from the array of streams of the current instance using its assigned ID.
|
|
1419
1486
|
* `streams`
|
|
1420
1487
|
- Returns: [StreamEntry[]](#streamentry)
|
|
1421
1488
|
|
|
@@ -1444,3 +1511,78 @@ Exposes the Pino package version. Also available on the logger instance.
|
|
|
1444
1511
|
### `Level`
|
|
1445
1512
|
|
|
1446
1513
|
* Values: `"fatal"` | `"error"` | `"warn"` | `"info"` | `"debug"` | `"trace"`
|
|
1514
|
+
|
|
1515
|
+
## TypeScript
|
|
1516
|
+
|
|
1517
|
+
### Module Augmentation
|
|
1518
|
+
|
|
1519
|
+
Pino supports TypeScript module augmentation to extend its type definitions. This allows you to customize the logging behavior to fit your application's specific requirements.
|
|
1520
|
+
|
|
1521
|
+
#### `LogFnFields` Interface
|
|
1522
|
+
|
|
1523
|
+
The `LogFnFields` interface can be augmented to control what fields are allowed in logging method objects. This is particularly useful for:
|
|
1524
|
+
|
|
1525
|
+
- Preventing certain fields from being logged (for security or compliance reasons)
|
|
1526
|
+
- Enforcing specific field types across your application
|
|
1527
|
+
- Enforcing consistent structured logging
|
|
1528
|
+
|
|
1529
|
+
##### Banning Fields
|
|
1530
|
+
|
|
1531
|
+
You can ban specific fields from being passed to logging methods by setting them to `never`. This helps prevent users from unintentionally overriding fields that are already set in the logger's `base` option, or clarifies that these fields are predefined.
|
|
1532
|
+
|
|
1533
|
+
```typescript
|
|
1534
|
+
declare module "pino" {
|
|
1535
|
+
interface LogFnFields {
|
|
1536
|
+
service?: never;
|
|
1537
|
+
version?: never;
|
|
1538
|
+
}
|
|
1539
|
+
}
|
|
1540
|
+
|
|
1541
|
+
|
|
1542
|
+
// These will now cause TypeScript errors
|
|
1543
|
+
logger.info({ service: 'other-api', message: 'success' }) // ❌
|
|
1544
|
+
logger.info({ message: 'success' }) // ✅
|
|
1545
|
+
```
|
|
1546
|
+
|
|
1547
|
+
##### Enforcing Field Types
|
|
1548
|
+
|
|
1549
|
+
You can also enforce specific types for certain fields:
|
|
1550
|
+
|
|
1551
|
+
```typescript
|
|
1552
|
+
declare module "pino" {
|
|
1553
|
+
interface LogFnFields {
|
|
1554
|
+
userId?: string;
|
|
1555
|
+
requestId?: string;
|
|
1556
|
+
}
|
|
1557
|
+
}
|
|
1558
|
+
|
|
1559
|
+
// These will cause TypeScript errors
|
|
1560
|
+
logger.info({ userId: 123 }) // ❌ Error: userId must be string
|
|
1561
|
+
logger.info({ requestId: null }) // ❌ Error: requestId must be string
|
|
1562
|
+
|
|
1563
|
+
// This works fine
|
|
1564
|
+
logger.info({ userId: '123' }) // ✅ Works fine
|
|
1565
|
+
```
|
|
1566
|
+
|
|
1567
|
+
##### Enforcing Structured Logging
|
|
1568
|
+
|
|
1569
|
+
Required fields (non-optional) enforce consistent structured logging by requiring specific fields in all log objects:
|
|
1570
|
+
|
|
1571
|
+
```typescript
|
|
1572
|
+
declare module "pino" {
|
|
1573
|
+
interface LogFnFields {
|
|
1574
|
+
userId: string
|
|
1575
|
+
}
|
|
1576
|
+
}
|
|
1577
|
+
|
|
1578
|
+
logger.info({ userId: '123' }) // ✅ Works fine
|
|
1579
|
+
logger.info({}) // ❌ Property 'userId' is missing in type '{}'
|
|
1580
|
+
```
|
|
1581
|
+
|
|
1582
|
+
**Note**: Required fields will cause TypeScript errors when logging certain types like `Error` objects that don't contain the required properties:
|
|
1583
|
+
|
|
1584
|
+
```typescript
|
|
1585
|
+
logger.error(new Error('test')) // ❌ Property 'userId' is missing in type 'Error'
|
|
1586
|
+
```
|
|
1587
|
+
|
|
1588
|
+
This ensures that all log entries include required context fields, promoting consistent logging practices.
|
|
@@ -27,6 +27,21 @@ pino.info('hi') // creates and logs {msg: 'hi', level: 30, time: <ts>}
|
|
|
27
27
|
|
|
28
28
|
When `write` is set, `asObject` will always be `true`.
|
|
29
29
|
|
|
30
|
+
### `asObjectBindingsOnly` (Boolean)
|
|
31
|
+
|
|
32
|
+
```js
|
|
33
|
+
const pino = require('pino')({browser: {asObjectBindingsOnly: true}})
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
The `asObjectBindingsOnly` option is similar to `asObject` but will keep the message
|
|
37
|
+
and arguments unformatted. This allows to defer formatting the message to the
|
|
38
|
+
actual call to `console` methods, where browsers then have richer formatting in
|
|
39
|
+
their devtools than when pino will format the message to a string first.
|
|
40
|
+
|
|
41
|
+
```js
|
|
42
|
+
pino.info('hello %s', 'world') // creates and logs {level: 30, time: <ts>}, 'hello %s', 'world'
|
|
43
|
+
```
|
|
44
|
+
|
|
30
45
|
### `formatters` (Object)
|
|
31
46
|
|
|
32
47
|
An object containing functions for formatting the shape of the log lines. When provided, it enables the logger to produce a pino-like log object with customized formatting. Currently, it supports formatting for the `level` object only.
|
|
@@ -144,7 +159,7 @@ Unlike server pino the serializers apply to every object passed to the logger me
|
|
|
144
159
|
if the `asObject` option is `true`, this results in the serializers applying to the
|
|
145
160
|
first object (as in server pino).
|
|
146
161
|
|
|
147
|
-
For more info on serializers see https://github.com/pinojs/pino/blob/master/docs/api.md#
|
|
162
|
+
For more info on serializers see https://github.com/pinojs/pino/blob/master/docs/api.md#mergingobject.
|
|
148
163
|
|
|
149
164
|
### `transmit` (Object)
|
|
150
165
|
|
|
@@ -7,7 +7,6 @@ In particular, a bundler must ensure that the following files are also bundled s
|
|
|
7
7
|
* `lib/worker.js` from the `thread-stream` dependency
|
|
8
8
|
* `file.js`
|
|
9
9
|
* `lib/worker.js`
|
|
10
|
-
* `lib/worker-pipeline.js`
|
|
11
10
|
* Any transport used by the user (like `pino-pretty`)
|
|
12
11
|
|
|
13
12
|
Once the files above have been generated, the bundler must also add information about the files above by injecting a code that sets `__bundlerPathsOverrides` in the `globalThis` object.
|
|
@@ -22,12 +21,11 @@ globalThis.__bundlerPathsOverrides = {
|
|
|
22
21
|
'thread-stream-worker': pinoWebpackAbsolutePath('./thread-stream-worker.js')
|
|
23
22
|
'pino/file': pinoWebpackAbsolutePath('./pino-file.js'),
|
|
24
23
|
'pino-worker': pinoWebpackAbsolutePath('./pino-worker.js'),
|
|
25
|
-
'pino-pipeline-worker': pinoWebpackAbsolutePath('./pino-pipeline-worker.js'),
|
|
26
24
|
'pino-pretty': pinoWebpackAbsolutePath('./pino-pretty.js'),
|
|
27
25
|
};
|
|
28
26
|
```
|
|
29
27
|
|
|
30
|
-
Note that `pino/file`, `pino-worker
|
|
28
|
+
Note that `pino/file`, `pino-worker` and `thread-stream-worker` are required identifiers. Other identifiers are possible based on the user configuration.
|
|
31
29
|
|
|
32
30
|
## Webpack Plugin
|
|
33
31
|
|
|
@@ -36,3 +34,7 @@ If you are a Webpack user, you can achieve this with [pino-webpack-plugin](https
|
|
|
36
34
|
## Esbuild Plugin
|
|
37
35
|
|
|
38
36
|
[esbuild-plugin-pino](https://github.com/davipon/esbuild-plugin-pino) is the esbuild plugin to generate extra pino files for bundling.
|
|
37
|
+
|
|
38
|
+
## Bun Plugin
|
|
39
|
+
|
|
40
|
+
[bun-plugin-pino](https://github.com/vktrl/bun-plugin-pino) is the Bun plugin to generate extra pino files for bundling.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Diagnostics
|
|
2
|
+
|
|
3
|
+
Pino provides [tracing channel](tc) events that allow insight into the
|
|
4
|
+
internal workings of the library. The currently supported events are:
|
|
5
|
+
|
|
6
|
+
+ `tracing:pino_asJson:start`: emitted when the final serialization process
|
|
7
|
+
of logs is started. The emitted event payload has the following fields:
|
|
8
|
+
- `instance`: the Pino instance associated with the function
|
|
9
|
+
- `arguments`: the arguments passed to the function
|
|
10
|
+
+ `tracing:pino_asJson:end`: emitted at the end of the final serialization
|
|
11
|
+
process. The emitted event payload has the following fields:
|
|
12
|
+
- `instance`: the Pino instance associated with the function
|
|
13
|
+
- `arguments`: the arguments passed to the function
|
|
14
|
+
- `result`: the finalized, newline delimited, log line as a string
|
|
15
|
+
|
|
16
|
+
[tc]: https://nodejs.org/docs/latest/api/diagnostics_channel.html#tracingchannel-channels
|
|
@@ -16,10 +16,10 @@ Please send a PR to add new modules!
|
|
|
16
16
|
Pino to log requests within [express](https://expressjs.com/).
|
|
17
17
|
+ [`koa-pino-logger`](https://github.com/pinojs/koa-pino-logger): use Pino to
|
|
18
18
|
log requests within [Koa](https://koajs.com/).
|
|
19
|
-
+ [`rill-pino-logger`](https://github.com/pinojs/rill-pino-logger): use Pino as
|
|
20
|
-
the logger for the [Rill framework](https://rill.site/).
|
|
21
19
|
+ [`restify-pino-logger`](https://github.com/pinojs/restify-pino-logger): use
|
|
22
20
|
Pino to log requests within [restify](http://restify.com/).
|
|
21
|
+
+ [`rill-pino-logger`](https://github.com/pinojs/rill-pino-logger): use Pino as
|
|
22
|
+
the logger for the [Rill framework](https://rill.site/).
|
|
23
23
|
|
|
24
24
|
### Utilities
|
|
25
25
|
+ [`pino-arborsculpture`](https://github.com/pinojs/pino-arborsculpture): change
|
|
@@ -27,6 +27,7 @@ log levels at runtime.
|
|
|
27
27
|
+ [`pino-caller`](https://github.com/pinojs/pino-caller): add callsite to the log line.
|
|
28
28
|
+ [`pino-clf`](https://github.com/pinojs/pino-clf): reformat Pino logs into
|
|
29
29
|
Common Log Format.
|
|
30
|
+
+ [`pino-console`](https://github.com/pinojs/pino-console): adapter for the [WHATWG Console](https://console.spec.whatwg.org/) spec.
|
|
30
31
|
+ [`pino-debug`](https://github.com/pinojs/pino-debug): use Pino to interpret
|
|
31
32
|
[`debug`](https://npm.im/debug) logs.
|
|
32
33
|
+ [`pino-elasticsearch`](https://github.com/pinojs/pino-elasticsearch): send
|
|
@@ -43,10 +44,10 @@ for [Hapi](https://hapijs.com/).
|
|
|
43
44
|
requests with the core `http` module.
|
|
44
45
|
+ [`pino-http-print`](https://github.com/pinojs/pino-http-print): reformat Pino
|
|
45
46
|
logs into traditional [HTTPD](https://httpd.apache.org/) style request logs.
|
|
46
|
-
+ [`pino-multi-stream`](https://github.com/pinojs/pino-multi-stream): send
|
|
47
|
-
logs to multiple destination streams (slow!).
|
|
48
47
|
+ [`pino-mongodb`](https://github.com/pinojs/pino-mongodb): store Pino logs
|
|
49
48
|
in a MongoDB database.
|
|
49
|
+
+ [`pino-multi-stream`](https://github.com/pinojs/pino-multi-stream): send
|
|
50
|
+
logs to multiple destination streams (slow!).
|
|
50
51
|
+ [`pino-noir`](https://github.com/pinojs/pino-noir): redact sensitive information
|
|
51
52
|
in logs.
|
|
52
53
|
+ [`pino-pretty`](https://github.com/pinojs/pino-pretty): basic prettifier to
|
|
@@ -59,25 +60,27 @@ core object serializers used within Pino.
|
|
|
59
60
|
to standard syslog format.
|
|
60
61
|
+ [`pino-tee`](https://github.com/pinojs/pino-tee): pipe Pino logs into files
|
|
61
62
|
based upon log levels.
|
|
62
|
-
+ [`pino-toke`](https://github.com/pinojs/pino-toke): reformat Pino logs
|
|
63
|
-
according to a given format string.
|
|
64
63
|
+ [`pino-test`](https://github.com/pinojs/pino-test): a set of utilities for
|
|
65
64
|
verifying logs generated by the Pino logger.
|
|
65
|
+
+ [`pino-toke`](https://github.com/pinojs/pino-toke): reformat Pino logs
|
|
66
|
+
according to a given format string.
|
|
66
67
|
|
|
67
68
|
|
|
68
69
|
<a id="community"></a>
|
|
69
70
|
## Community
|
|
70
71
|
|
|
72
|
+
+ [`@google-cloud/pino-logging-gcp-config`](https://www.npmjs.com/package/@google-cloud/pino-logging-gcp-config): Config helper and formatter to output [Google Cloud Platform Structured Logging](https://cloud.google.com/logging/docs/structured-logging)
|
|
73
|
+
+ [`@newrelic/pino-enricher`](https://github.com/newrelic/newrelic-node-log-extensions/blob/main/packages/pino-log-enricher): a log customization to add New Relic context to use [Logs In Context](https://docs.newrelic.com/docs/logs/logs-context/logs-in-context/)
|
|
74
|
+
+ [`cloud-pine`](https://github.com/metcoder95/cloud-pine): transport that provides abstraction and compatibility with [`@google-cloud/logging`](https://www.npmjs.com/package/@google-cloud/logging).
|
|
75
|
+
+ [`cls-proxify`](https://github.com/keenondrums/cls-proxify): integration of pino and [CLS](https://github.com/jeff-lewis/cls-hooked). Useful for creating dynamically configured child loggers (e.g. with added trace ID) for each request.
|
|
76
|
+
+ [`crawlee-pino`](https://github.com/imyelo/crawlee-pino): use Pino to log within Crawlee
|
|
77
|
+
+ [`eslint-plugin-pino`](https://github.com/orzarchi/eslint-plugin-pino): linting rules for pino usage, primarly for preventing missing context in logs due to incorrect argument order.
|
|
71
78
|
+ [`pino-colada`](https://github.com/lrlna/pino-colada): cute ndjson formatter for pino.
|
|
79
|
+
+ [`pino-dev`](https://github.com/dnjstrom/pino-dev): simple prettifier for pino with built-in support for common ecosystem packages.
|
|
72
80
|
+ [`pino-fluentd`](https://github.com/davidedantonio/pino-fluentd): send Pino logs to Elasticsearch,
|
|
73
81
|
MongoDB, and many [others](https://www.fluentd.org/dataoutputs) via Fluentd.
|
|
82
|
+
+ [`pino-lambda`](https://github.com/FormidableLabs/pino-lambda): log transport for cloudwatch support inside aws-lambda
|
|
74
83
|
+ [`pino-pretty-min`](https://github.com/unjello/pino-pretty-min): a minimal
|
|
75
84
|
prettifier inspired by the [logrus](https://github.com/sirupsen/logrus) logger.
|
|
76
85
|
+ [`pino-rotating-file`](https://github.com/homeaway/pino-rotating-file): a hapi-pino log transport for splitting logs into separate, automatically rotating files.
|
|
77
|
-
+ [`cls-proxify`](https://github.com/keenondrums/cls-proxify): integration of pino and [CLS](https://github.com/jeff-lewis/cls-hooked). Useful for creating dynamically configured child loggers (e.g. with added trace ID) for each request.
|
|
78
86
|
+ [`pino-tiny`](https://github.com/holmok/pino-tiny): a tiny (and extensible?) little log formatter for pino.
|
|
79
|
-
+ [`pino-dev`](https://github.com/dnjstrom/pino-dev): simple prettifier for pino with built-in support for common ecosystem packages.
|
|
80
|
-
+ [`@newrelic/pino-enricher`](https://github.com/newrelic/newrelic-node-log-extensions/blob/main/packages/pino-log-enricher): a log customization to add New Relic context to use [Logs In Context](https://docs.newrelic.com/docs/logs/logs-context/logs-in-context/)
|
|
81
|
-
+ [`pino-lambda`](https://github.com/FormidableLabs/pino-lambda): log transport for cloudwatch support inside aws-lambda
|
|
82
|
-
+ [`cloud-pine`](https://github.com/metcoder95/cloud-pine): transport that provides abstraction and compatibility with [`@google-cloud/logging`](https://www.npmjs.com/package/@google-cloud/logging).
|
|
83
|
-
+ [`crawlee-pino`](https://github.com/imyelo/crawlee-pino): use Pino to log within Crawlee
|
|
@@ -60,7 +60,7 @@ somewhere so the log rotation tool knows where to send the signal.
|
|
|
60
60
|
|
|
61
61
|
```js
|
|
62
62
|
// write the process pid to a well known location for later
|
|
63
|
-
const fs = require('fs')
|
|
63
|
+
const fs = require('node:fs')
|
|
64
64
|
fs.writeFileSync('/var/run/myapp.pid', process.pid)
|
|
65
65
|
|
|
66
66
|
const dest = pino.destination('/log/file')
|
|
@@ -125,7 +125,7 @@ ExecStart=/bin/sh -c '/path/to/node app.js | pino-transport'
|
|
|
125
125
|
|
|
126
126
|
Pino's default log destination is the singular destination of `stdout`. While
|
|
127
127
|
not recommended for performance reasons, multiple destinations can be targeted
|
|
128
|
-
by using [`pino.multistream`](/
|
|
128
|
+
by using [`pino.multistream`](/docs/api.md#pino-multistream).
|
|
129
129
|
|
|
130
130
|
In this example, we use `stderr` for `error` level logs and `stdout` as default
|
|
131
131
|
for all other levels (e.g. `debug`, `info`, and `warn`).
|
|
@@ -260,6 +260,32 @@ module.exports = function createLogger(options) {
|
|
|
260
260
|
}
|
|
261
261
|
```
|
|
262
262
|
|
|
263
|
+
A library that configures Pino for
|
|
264
|
+
[Google Cloud Structured Logging](https://cloud.google.com/logging/docs/structured-logging)
|
|
265
|
+
is available at:
|
|
266
|
+
[@google-cloud/pino-logging-gcp-config](https://www.npmjs.com/package/@google-cloud/pino-logging-gcp-config)
|
|
267
|
+
|
|
268
|
+
This library has the following features:
|
|
269
|
+
|
|
270
|
+
+ Converts Pino log levels to Google Cloud Logging log levels, as above
|
|
271
|
+
+ Uses `message` instead of `msg` for the message key, as above
|
|
272
|
+
+ Adds a millisecond-granularity timestamp in the
|
|
273
|
+
[structure](https://cloud.google.com/logging/docs/agent/logging/configuration#timestamp-processing)
|
|
274
|
+
recognised by Google Cloud Logging eg: \
|
|
275
|
+
`"timestamp":{"seconds":1445470140,"nanos":123000000}`
|
|
276
|
+
+ Adds a sequential
|
|
277
|
+
[`insertId`](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#FIELDS.insert_id)
|
|
278
|
+
to ensure log messages with identical timestamps are ordered correctly.
|
|
279
|
+
+ Logs including an `Error` object have the
|
|
280
|
+
[`stack_trace`](https://cloud.google.com/error-reporting/docs/formatting-error-messages#log-error)
|
|
281
|
+
property set so that the error is forwarded to Google Cloud Error Reporting.
|
|
282
|
+
+ Includes a
|
|
283
|
+
[`ServiceContext`](https://cloud.google.com/error-reporting/reference/rest/v1beta1/ServiceContext)
|
|
284
|
+
object in the logs for Google Cloud Error Reporting, auto detected from the
|
|
285
|
+
environment if not specified
|
|
286
|
+
+ Maps the OpenTelemetry properties `span_id`, `trace_id`, and `trace_flags`
|
|
287
|
+
to the equivalent Google Cloud Logging fields.
|
|
288
|
+
|
|
263
289
|
<a id="grafana-loki"></a>
|
|
264
290
|
## Using Grafana Loki to evaluate pino logs in a kubernetes cluster
|
|
265
291
|
|
|
@@ -316,4 +342,4 @@ if you have broader logging requirements.
|
|
|
316
342
|
<a id="testing"></a>
|
|
317
343
|
## Testing
|
|
318
344
|
|
|
319
|
-
See [`pino-test`](https://github.com/pinojs/pino-test).
|
|
345
|
+
See [`pino-test`](https://github.com/pinojs/pino-test).
|
|
@@ -43,7 +43,8 @@ A "month" is defined as 30 consecutive days.
|
|
|
43
43
|
|
|
44
44
|
| Version | Release Date | End Of LTS Date | Node.js |
|
|
45
45
|
| :------ | :----------- | :-------------- | :------------------- |
|
|
46
|
-
|
|
|
46
|
+
| 9.x | 2024-04-26 | TBD | 18, 20, 22 |
|
|
47
|
+
| 8.x | 2022-06-01 | 2024-10-26 | 14, 16, 18, 20 |
|
|
47
48
|
| 7.x | 2021-10-14 | 2023-06-01 | 12, 14, 16 |
|
|
48
49
|
| 6.x | 2020-03-07 | 2022-04-14 | 10, 12, 14, 16 |
|
|
49
50
|
|
|
@@ -58,6 +59,6 @@ the YAML workflow labels below:
|
|
|
58
59
|
|
|
59
60
|
| OS | YAML Workflow Label | Node.js |
|
|
60
61
|
|---------|------------------------|--------------|
|
|
61
|
-
| Linux | `ubuntu-latest` |
|
|
62
|
-
| Windows | `windows-latest` |
|
|
63
|
-
| MacOS | `macos-latest` |
|
|
62
|
+
| Linux | `ubuntu-latest` | 18, 20, 22 |
|
|
63
|
+
| Windows | `windows-latest` | 18, 20, 22 |
|
|
64
|
+
| MacOS | `macos-latest` | 18, 20, 22 |
|