Releases: sainsburys-tech/next-logger
Security & version updates
This release focuses on fixing security issues with dependency versions, and updating other non-breaking versions.
async
andminimatch
have both been upgrade to mitigate high severity security issues.- Toolchain dependencies, like ESLint, Prettier and Jest have been upgraded.
- The Node version used to test this repository has been upgraded from Node 14 to 18, to avoid it going EOL.
- Pino has been upgraded to version 8, which brings no breaking changes. This closes #19 - thanks @ristomatti!
Additionally, this repository has had a change of ownership; moving from @atkinchris into @sainsburys-tech. There's no change to the package name, license or publishing.
Support trace (and future logger methods)
This adds support for trace
logs, introduced in Next.js 12.
Support configuring Pino and custom loggers
This major release brings support for configuring the underlying Pino instance used for logging, or to replace it entirely with a custom logger. The existing logger behaviour has been put into the default logger, to avoid breaking changes.
This also updates the testing strategy to additionally run some test suites within containers, to provide further assurance on the package working in isolation.
Simplify the requiring of Next's output logger
Dependencies & npm audit
The fixes all current npm audit
issues, and upgrades Pino.
Fix handling undefined and null values
This fixes handling of null
and undefined
logs, which would otherwise have thrown an error when accessing .length
.
Thanks to @timoweiss for raising the fix in #5!
Fix exception logging
v2.0.1
Fix audit issues within dev dependencies
Patch global console methods
This adds patches for the global console
logging methods. This allows this library to intercept logs made by Next.js, where they are made directly to the console
object.
While pino
logging remains intact, this may cause issues with other libraries which patch or use console
methods. Use the next-only
preset to opt-out of this patching.
Support presets for opt-out patches
This adds support for "presets", allowing consumers to opt-in or out of the patches they want to use.