Skip to content

v0.9.1

Compare
Choose a tag to compare
@mobsense mobsense released this 30 Jul 01:54
· 46 commits to main since this release

Major Feature Release

Features / Changes

  • Simplified API -- support on-demand log channels

  • Rename levels -> channels

  • Update README

Breaking Changes

The addLevels, getLevels and constructor levels property have been removed.

The rationale is that levels are not needed. Users can create levels on-demand via the emit() method. This is hugely beneficial as you can add custom logging to modules without needing to pre-declare the log channel. The log message won't be emitted until you enable the filter (without redeploying code). You don't need to enable the log level (now called channels) anymore.

Previously you needed to addLevels (channels) for custom log channels. Now you just use log.emit('your-custom-channel'). And this will be dormant in your code until you enable the channel filter.

Fixes

  • none

See