Releases: trivialsoftware/trivial-logging
v2.0.1
v2.0.0
v2.0.0-rc.10
Minot typing fixes.
v2.0.0-rc.4
Converted the project over to typescript, and published the type descriptions.
v2.0.0-rc.2
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
Minor Update
This update just changed the pretty-printing output; that's all.
v2.0.0-rc.0
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
v1.5.0
New Features
- Added
config.level
to specify a minimum level for logging streams.
Changes
- Removed reliance on
config.debug
to be set forconfig.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
.