Releases: Julien-R44/pino-loki
Releases · Julien-R44/pino-loki
v3.0.0
Node.js 20+ Required
Node.js 18 is no longer supported. The minimum required version is now Node.js 20.
Batching Options Restructured
The batching configuration has been consolidated into a single object:
// Before (v2.x)
pinoLoki({ host: '...', batching: true, interval: 5 })
// After (v3.x)
pinoLoki({ host: '...', batching: { interval: 5, maxBufferSize: 10_000 } })
// Or simply omit for defaults, or set batching: false to disableDefault Buffer Limit
A new maxBufferSize option (default: 10,000) prevents out-of-memory issues when Loki is unavailable. When the buffer is full, oldest logs are dropped (FIFO).
Structured Metadata Enabled by Default
structuredMetaKey now defaults to 'meta'. Logs with a meta property will automatically send it as Loki structured metadata. Use structuredMetaKey: false to disable.
CLI Changes
- --batch => --batching
- --interval => --batching-interval
- --timeout default: 2000ms → 30000ms
- Added --batching-max-buffer-size
- Removed -pl shorthand (use --propsLabels)
🚨 Breaking Changes
- Add maxBufferSize option + update batching API - by @Julien-R44 (e00e6)
- Update dependencies ( drop node 18 ) - by @Julien-R44 (feb04)
- Use
metaas default structured meta key - by @Julien-R44 (43ebb) - Change timeout default value - by @Julien-R44 (5de97)
- Remove deprecated CLI options - by @Julien-R44 (ba7b1)
🐞 Bug Fixes
- Force structured metadata values to string - by @chaintng and @Julien-R44 in #48 (6f69d)
- Remove hostname from log object before formatting - by @Julien-R44 (d6d1a)
- Avoid duplicate buffer flush on transport shutdown - by @Julien-R44 (db751)
View changes on GitHub
v2.6.0
Features
- Added support for custom headers in the CLI
- New
formatLogoption to customize how logs are formatted before being sent to Loki
Chore
- migrated to ESM (still doing dual publishing with CJS + ESM)
- switched to Tsdown
- enabled
allowImportingTsExtensions - dropped Commander and switched to Node’s built-in
parseArgs
v2.5.0
v2.4.0
Move from got to native fetch
v2.3.0
🚀 Features
- Convert arrays to indexed object - by @Julien-R44, Joel Edwardson and joeledwardson in #27 (6078a)
View changes on GitHub
v2.2.1
v2.2.0
🚀 Features
- Support for custom log level mapping - by @vktrl (#23)
- Add got response body when logpusher fail - by @Julien-R44 (013f1)
- Add docker-compose for running test locally - by @Julien-R44 (a3e1e)
🐞 Bug Fixes
- Restore nock - by @Julien-R44 (bf344)
View changes on GitHub
v2.1.3
Downgrade Got dependency and fix CJS/ ESM issue
v2.1.2
No significant changes