Releases: JaniAnttonen/winston-loki
6.0.0 Release Candidate 2
Adds functionality added by @mpetrunic and @nmlinaric in #37
6.0.0 Release candidate
A lot has changed! Loki has got a new push endpoint since the last release, and there's some changes to the data model as well on their end.
This was a bit larger update than I thought, and the tests are still unfortunately lagging behind. All things should work, and I've tested both the JSON and Protobuf side of things locally with a Loki instance.
There's also a new directory, ./examples/
! If you want to get a head start on how to use winston-loki, please check that out for a fast test configuration of Grafana+Loki+Promtail
and run the examples with node
.
Because the thing works though the tests don't, I'll release this under the @next tag in npm
. If you want to take a deep dive in Node.js testing world, please take a look at the tests. I'll try to fix them myself whenever I have more time on my hands.
Thanks to all that have contributed to the library so far, you've been indispensable!
Hotfix to add a possibility to disable graceful shutdown.
This is a hotfix release that doesn't change any default behaviour compared to 5.1.0
.
Following is an example to disable the graceful shutdown:
new LokiTransport({
host: "http://localhost:3100",
gracefulShutdown: false
})
Enable custom labels per log
Thanks to @Autom3, there's a possibility to now use different labels on every logger call! Example in readme :)
Add custom formatting, fix JSON behaviour
Adds custom formatting and labels for the logs, thanks to @JoHuang! Nice to see the community's help with this project, and the increased use of this library.
Fixes a bug with JSON batching behaviour.
Remove redundant robustness & complexity
NOTE: This version only guaranteed to work with the latest version of Grafana Loki. Make sure to update Loki if you have updated this package!
Since Grafana has patched Loki to accept duplicate timestamps, we don't need to try to ensure them on the client side anymore. This version removes the sorting and ensuring the timestamps of the batches before sending, resulting in lower complexity.
Snappy and Protobuf now optional
Fixes issues with builds running in environments where snappy and/or protobuf is not needed. In a case the binaries for snappy aren't found, falls back to JSON transport.
Plenty of new options with added robustness!
Added some more tests and options with this release, mainly focusing on removing errors related to duplicate timestamps described in issue grafana/loki#168 of Grafana Loki.
There might still be issues with JSON transport though: #4
Protobuf transport added as the default!
Shouldn't affect any working installations, but if there's any problems, please file an issue.
You can change back to JSON transport by defining the json
option as true when creating the transport.
First release
First release with some tests added.