Skip to content

Releases: trivialsoftware/trivial-logging

v2.0.1

12 Oct 21:46
Compare
Choose a tag to compare

Updates

  • Updated dependencies (did not update pino to v6, since there's breaking changes.)

Fixes

  • Fixed a bug where trivial-logging would output v: 1 when pretty printing.
  • Fixed some Typescript v4 compile errors.
  • Fixed some bad filenames.

v2.0.0

12 Oct 21:43
Compare
Choose a tag to compare

Finally released v2. No changes over v2.0.0-rc.10.

v2.0.0-rc.10

22 Dec 21:12
Compare
Choose a tag to compare
v2.0.0-rc.10 Pre-release
Pre-release

Minot typing fixes.

v2.0.0-rc.4

17 Dec 00:35
Compare
Choose a tag to compare
v2.0.0-rc.4 Pre-release
Pre-release

Converted the project over to typescript, and published the type descriptions.

v2.0.0-rc.2

12 Sep 14:28
Compare
Choose a tag to compare
v2.0.0-rc.2 Pre-release
Pre-release

Minor Update

In this release, we've solved an issue with our pino-pretty dependency. It's intended only to be used while developing, but trivial-logging would not load without pino-pretty installed. This has been fixed.

v2.0.0-rc.1

12 Sep 14:24
Compare
Choose a tag to compare
v2.0.0-rc.1 Pre-release
Pre-release

Minor Update

This update just changed the pretty-printing output; that's all.

v2.0.0-rc.0

15 Jul 02:12
Compare
Choose a tag to compare
v2.0.0-rc.0 Pre-release
Pre-release

New Major Release!

We've switched logging libraries! Originally, trivial-logging used bunyan to do all of it's logging. Bunyan was good to us, but it hasn't had a release in two years, and the dtrace library it includes is getting more and more painful to use. We evaluated several libraries, and pino came out on top.

Breaking changes

  • switched to pino library. (#5)

Because we switched libraries, the output format and configuration has changed significantly. However, the api is still the same, so there's that.

Upgrading to v2.x

Output

The output may have changed, but it should still be 'bunyan compatible'. The biggest change is to error parsing; Error objects are not parsed in pino unless they're the first object passed to the logger. However, trivial-logging attempts to parse them into regular objects (using either .toJSON or pulling message, stack, and code) if it's included in an error or warn logger. While this slows logging errors or warnings down some, it should make trivial-logging more compatible.

The only user action that needs to be taken is to avoid passing a raw error object to trace, debug, or info.

Debug logging

The debug logging looks very different. I don't like it as much, but I don't want to write my own debug logger. It may be replaced in the future.

Configuration

The configuration has changes significantly. We no longer support the logging key; instead configuration is in the form of:

const config = {
    debug: true, // Turn on pretty-printing
    nullLogger: false, // Don't turn off all logging
    options: {
        // pino options here
    }
};

You will have to remove debugStream in favor of debug, as well as any other conversions between bunyan's options and pino's.

v1.5.1

27 Jun 16:28
Compare
Choose a tag to compare

Bugfixes

  • Respect config.debug as a way of setting config.level, if not set.

This change was missing from the v1.5.0 release; basically, it ensures that we're mostly backwards compatible with previous config.debug usage.

v1.5.0

27 Jun 15:43
Compare
Choose a tag to compare

New Features

  • Added config.level to specify a minimum level for logging streams.

Changes

  • Removed reliance on config.debug to be set for config.debugStream to work.
  • Made LOG_LEVEL env variable override no matter what.

The first new feature is adding config.level, which will specify a minimum level a stream should be at, but if the stream was configured with a lower level, that will be respected.

In terms of changes, now the environment variable LOG_LEVEL will always override the stream, regardless of anything else. (This allows you to raise the logging level even if you have config.debug or config.level set.) At the same time, we've removed the requirement for config.debug to be set in order to set config.debugStream true.

Breaking Changes

  • config.debug no longer forces streams to be debug

If you were relying on config.debug to set your streams to debug, we will now translate that into config.level = 'debug', meaning we won't force streams to be debug, we'll force them to be at least debug.

It is strongly encouraged that you stop using config.debug.

v1.4.0

30 May 02:24
Compare
Choose a tag to compare

New Features

  • Added nullLogger support.

We added a null logger that turns all logging operations into no-ops. It has the same api as bunyan, but everything is a stub implementation.