Releases: Yamboy1/deno-structured-logging
v0.4.2
v0.4.1
v0.4.0
We've got some pretty big changes in this release, but also some awesome features to go along with them.
Sinks API
The Sinks API has been rewritten again, to use functions instead of classes, inspired partly by reacts movement towards functional components.
Logger
The sinks
parameter in createLogger
has been removed in favour of addSink
. We also have the addition of custom output formats. These can be set for all sinks, through createLogger
or per sink, through addSink
. The per sink configuration overrides the global one. There are currently two output formats that we export, textFormat and jsonFormat (or rather ndjson). The formats are literally just strings, like format strings in log methods, so you can easily create your own formats.
Console Sink
The console sink is now configurable! You can customise, both whether colors are output and set override colors for the log levels. This means that if you prefer to have green as your color for debug, you can override the default gray and do that.
v0.3.0
The sink api has be rewritten to use classes, to allow sinks to easier have internal state, i.e. filename for a file sink. These sinks come with accompanying creator / factory functions which should be used rather than the classes themselves. On top of this a new file sink has been added to complement the console sink.