Releases: seek-oss/logger
v8.0.0
v7.0.0
Major Changes
-
Add default redact paths (#123)
@seek/logger
now redacts a set of built-in paths by default.These default paths cannot be disabled, and are concatenated to custom redact paths provided via
redact: ['custom.path']
orredact: { paths: ['custom.path'] }
.
v6.2.2
Patch Changes
-
deps: fast-redact ^3.5.0 (#119)
The mutation proof of concept that led us to pin v3.3.0 has been fixed in fast-redact@3.4.1:
const logger = createLogger({ redact: { censor: '???', paths: ['props.*'] }, }); const props = { name: 'PII' }; logger.child({ props }); logger.child({ props }); console.log({ props }); // { props: { name: 'PII' } }
The
TypeError
proof of concept reported in #14 has been fixed in fast-redact@3.5.0.
v6.2.1
Patch Changes
-
deps: Pin
fast-redact@3.3.0
(#114)This aims to discourage adoption of
fast-redact@3.4.0
as it mutates input data when you:- Write application logs with
@seek/logger
orpino
- Configure the
redact
option with wildcards - Use the logger in a slightly strange way, such as calling
.child()
with the same props more than once
const logger = createLogger({ redact: { censor: '???', paths: ['props.*'] }, }); const props = { name: 'PII' }; logger.child({ props }); logger.child({ props }); console.log({ props }); // { props: { name: '???' } }
If you suspect that your project meets these criteria, consider reviewing your lock file to ensure that
fast-redact@3.4.0
is not installed before merging this upgrade or a subsequent lock file maintenance PR. - Write application logs with
v6.2.0
Minor Changes
-
Omit request headers (#92)
@seek/logger
now omits the following properties fromheaders
andreq.headers
by default:x-envoy-attempt-count
x-envoy-decorator-operation
x-envoy-expected-rq-timeout-ms
x-envoy-external-address
x-envoy-internal
x-envoy-peer-metadata
x-envoy-peer-metadata-id
x-envoy-upstream-service-time
To opt out of this behaviour, provide an empty list or your own list of omissible request headers to
omitHeaderNames
:const logger = createLogger({ name: 'my-app', + omitHeaderNames: ['dnt', 'sec-fetch-dest'], });
You can also extend the default list like so:
- import createLogger from '@seek/logger'; + import createLogger, { DEFAULT_OMIT_HEADER_NAMES } from '@seek/logger'; const logger = createLogger({ name: 'my-app', + omitHeaderNames: [...DEFAULT_OMIT_HEADER_NAMES, 'dnt', 'sec-fetch-dest'] });
v6.1.1
v6.1.0
v6.0.0
6.0.0 (2023-04-18)
Bug Fixes
- pino ^8.0.0 (#59) (91beb59)
- serializers: use
.socket()
on the req serializer instead of.connection()
(#68) (e4553eb)
BREAKING CHANGES
-
pino 8.0.0 ships with async logging by default. The destination is set to sync by default in this library. However, if you override the destination option please consider setting it to
{ sync: true }
to avoid losing logs if the instance terminates unexpectedly. -
Node.js 16.11+ is now required. Node.js 14 will reach end of life by April 2023.