Skip to content

Latest commit

 

History

History
275 lines (151 loc) · 9.16 KB

CHANGELOG.md

File metadata and controls

275 lines (151 loc) · 9.16 KB

Change Log

3.2.0

Minor Changes

  • 5113fa3: Create a new mixin option for open telemetry and dynamic metadata support

3.1.6

Patch Changes

  • 6cd729d: Allow for the value of a masked property to be null or undefined

3.1.5

Patch Changes

  • 3044ab1: Set a default file descriptor for sonic-boom. This is helpful in environments like vitest

3.1.4

Patch Changes

  • 5ee0fed: Make it so that the "each" option does not end up double printing the arrays of objects passed to the logger
  • 5ee0fed: Fix an issue with sonic-boom not printing all the logs in a worker thread

3.1.3

Patch Changes

  • 44e293a: Properly ignore the hostname, pid, and application in json logsm if the option is set to not usethem

3.1.2

Patch Changes

  • 743cf48: Removed the index type from the ogma options to allow for better intellisense

3.1.1

Patch Changes

  • e67b383: Make sonic-boom work inside worker threads

3.1.0

Minor Changes

  • 15b6f6f: Allow the log level to be changed during runtime

3.0.0

Major Changes

  • fa89834: Major performance boosts

    • Stringified objects with Symbols now have the Symbol output as Symbol: description instead of Symbol(description)

    • BigInts are now handled in the stringification

    • no longer 0 non-@ogma/ deps

    • time is now output in milliseconds since epoch in JSON format

    • JSON logs keep the .message property even in the case of logging objects

    • default stream in Node environments now uses sonic-boom instead of process.stdout

    • Unification of how objects get stringified to make all non-standard properties act the same.

    • speed. Using toISOString() is a bit slow. Fast enough for the string format but wanted to speed up JSON just a tiny bit more, plus it's supposed to be machine readable more than anything

    • By keeping the .message property, even in the case of objects we're able to eliminate an if check and keep the speeds up on the JSON logging. Also, gives a defined proeprty that the user defined message will always be at

    Mostly, everything should be handled under the hood, it's more of just new deps and format changes to be aware of.

Patch Changes

  • Updated dependencies [be1367c]
    • @ogma/common@1.2.0

2.5.2

Patch Changes

  • 1c2854e: Fixed issues 1634 - Verbose logging bad printing

2.5.1

Patch Changes

  • dd5215e: Security updates of dependencies. Should be nothing major here.
  • Updated dependencies [dd5215e]
    • @ogma/common@1.1.1
    • @ogma/styler@1.0.1

2.5.0

Minor Changes

  • 8370e11: Allow for each to be set at a global level when initializing an Ogma instance

2.4.2

Patch Changes

  • 33c279b: Fix dependencies for better install experience

    @ogma/logger

    @ogma/common and @ogma/styler were set as peerDependencies instead of dependencies meaning package managers wouldn't install them by default. They are now properly set as dependencies

    @ogma/nestjs-module

    @ogma/logger was set as a peerDependency instead of a dependency. Now has been set to a dependency.

2.4.1

Patch Changes

2.4.0

Minor Changes

  • 2f5ccce: Allow for printing of each array value

2.3.0

Minor Changes

  • d2cbc49: added ability to modify logger message (remove pid, application, hostname)

2.2.0

Minor Changes

  • 33061ad: Adds the ability to mask values of an object while logging based on an initial array config

    A masks property can now be passed to the Ogma constructor. This property is an array, and will be checked against the keys of an object that Ogma is logging. If the key matches a value in the array, Ogma will replace the value with a string of asterisks (*) matching the length of the original string.

    e.g.

    ogma.log({ password: '12345' })
    

    will log the object

    {
      password: '*****'
    }
    

2.1.0

Minor Changes

  • 90d2d53: add 'levelKey' option

2.0.1

Patch Changes

  • 85fd2f4: Ogma no longer assigns `getColorDepth` if options.stream is process.stdout

2.0.0

Major Changes

  • 8bea02f: Release of @ogma/common and @ogma/styler. Upgrade @ogma/nestjs-module to be 100% compatible with Nest's logger

    Breaking Changes

    • @ogma/logger now depends on @ogma/common and @ogma/styler for types and string styling, instead of managing it on its own
    • @ogma/nestjs-module now accepts trace as the second parameter to error instead of context. meta can still be passed as a second parameter too or it can be a third parameter.
    • @ogma/logger now sets an ool property when logging in JSON mode to accommodate when using a custom log map
    • @ogma/logger no longer needs the stream property to have a hasColor function
    • @ogma/cli now reads from the ool property instead level to allow writing back to Ogma's standard format

    Features

    • @ogma/logger now correctly logs Error objects the same way process.stdout does instead of logging {}
    • @ogma/logger can accept a levelMap property for custom level mapping
    • @ogma/logger's stream option can now have a getColorDepth property method, but it is not necessary

    Why

    I wanted to be able to have full control over string styles and this gave me a great chance to learn about SGRs and how they work. Along with that, this gave me the perfect opportunity to make some changes to the logger to be more compliant with Nest's logger and have better compatibility with it.

    How to Upgrade

    I tried to make this is painless as possible in terms of breaking changes. For the most part, you should just be able to upgrade with no problems. If you have a stream with hasColor you will need to remove that method. You may want to add in the getColorDepth method, but can also just use FORCE_COLOR if necessary.

Patch Changes

  • Updated dependencies [8bea02f]
    • @ogma/common@1.0.0
    • @ogma/styler@1.0.0

1.0.0

Major Changes

  • bbf66f6: Major release of @ogma

    The ogma command has been moved from @ogma/logger to @ogma/cli. There are no other breaking changes. This change was made to keep the package size as small as possible and to keep the code clean and maintainable.

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

0.4.2 (2020-10-26)

Bug Fixes

Features

  • logger: move log level to earlier in the log (da00caa)

0.4.0 (2020-10-25)

Features

BREAKING CHANGES

  • all: log methods now take an object as the second parameter instead of having 3 extra optional parameters

0.3.1 (2020-09-12)

Features

  • logger: logger will not print function names when objects have funcs (c496d16)

0.3.0 (2020-09-05)

Features

  • all: add request id generation and log (00fd8c7)

0.2.2 (2020-08-10)

Features

  • logger: logs Symbol(name) instead of Symbol to be more clear (137db86)

0.2.1 (2020-07-25)

0.2.0 (2020-07-20)

Features

  • logger: adds hostname to the log output (a1f2b8d)

0.2.0 (2020-07-20)

Features

  • logger: adds hostname to the log output (a1f2b8d)

0.1.1 (2020-07-18)

Bug Fixes

  • gql: updates gql types to work with apollo > 2.11 (a097842)

0.1.0 (2020-04-20)

Features

  • module: let base module work for http express (1bb52a7)

Performance Improvements

  • logger: gets the pid at logger creation instead of at log time (d8913d0)