springernature / shunter

A Node.js application built to read JSON and translate it into HTML
GNU Lesser General Public License v3.0
237 stars 28 forks source link

Winston3 updates #327

Closed jpw closed 2 years ago

jpw commented 4 years ago

Dropping node 8 as a minimum supported version requires a major version bump for winston and winston-syslog.

Updating Winston from version 2 to 3 means that custom logging filters can no longer be used as they are deprecated.

Instead filters should be migrated to formats and supplied via a custom logging transport.

As Shunter supports user-supplied logging instances, filters and transports, this required some work.

Deprecating filters meant removing structure.loggingFilters config and related code, and documentation changes.

Quite a bit of work was done to (hopefully!) improve the test code around the logging module generally. This resulted in a hard-to-read diff, so probably best to check out the code and look in an editor 😉

This PR also includes a first attempt at a migration guide from 4 to 5.