Skip to content

Releases: seek-oss/logger

v9.1.0

16 Feb 22:19
6e4075f
Compare
Choose a tag to compare

Minor Changes

  • Add support for configuring custom log levels: (#164)

    import createLogger from '@seek/logger';
    
    const logger = createLogger({
      name: 'my-app',
      customLevels: {
        foo: 35,
      },
    });
    
    logger.foo('Bar');

v9.0.0

31 Jul 04:21
8ca5376
Compare
Choose a tag to compare

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.

v8.1.1

03 Jul 03:34
0ddf2a5
Compare
Choose a tag to compare

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();

v8.1.0

03 Jul 01:51
7833986
Compare
Choose a tag to compare

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)

v8.0.0

28 Apr 22:54
0723549
Compare
Choose a tag to compare

Major Changes

  • deps: pino 9 (#128)

    Our minimum Node.js version is now 18.18.

v7.0.0

03 Apr 06:43
b37958d
Compare
Choose a tag to compare

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'] }.

v6.2.2

19 Mar 22:08
0a97cc7
Compare
Choose a tag to compare

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

13 Mar 06:35
3ec2c17
Compare
Choose a tag to compare

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.

v6.2.0

10 Oct 01:56
636e5f9
Compare
Choose a tag to compare

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']
    });

v6.1.1

17 Aug 23:12
b40bfed
Compare
Choose a tag to compare

6.1.1 (2023-08-17)

Bug Fixes