Skip to content

Latest commit

 

History

History
143 lines (89 loc) · 4.98 KB

CHANGELOG.md

File metadata and controls

143 lines (89 loc) · 4.98 KB

@seek/logger

9.0.0

Major Changes

  • Apply trimming to serializers (#143)

    Previously, built-in serializers and custom ones supplied via the serializers option were not subject to trimming. This caused some emitted error logs to be extremely large.

    Now, trimming is applied across all serializers by default. If you rely on deeply nested err properties to troubleshoot your application, tune the maxObjectDepth configured on your logger.

8.1.1

Patch Changes

  • createDestination: Use Record type for stdoutMock.calls and stdoutMock.onlyCall() (#137)

    This allows you to destructure a call in your test code without the TypeScript compiler complaining:

    const { level, ...rest } = stdoutMock.onlyCall();

8.1.0

Minor Changes

  • createDestination: Implement logging integration testing (#134)

    @seek/logger now bundles a convenient mechanism for recording logging calls, built on Pino's support for customisable destinations. See docs/testing.md for more information.

Patch Changes

  • deps: pino-std-serializers ^7.0.0 (#130)

8.0.0

Major Changes

  • deps: pino 9 (#128)

    Our minimum Node.js version is now 18.18.

7.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'] or redact: { paths: ['custom.path'] }.

6.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.

6.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:

    1. Write application logs with @seek/logger or pino
    2. Configure the redact option with wildcards
    3. 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.

6.2.0

Minor Changes

  • Omit request headers (#92)

    @seek/logger now omits the following properties from headers and req.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']
    });