1.0.9 • Published 12 months ago
winston-http-batch-transport v1.0.9
Winston HTTP log transport
Pushes compressed winston logs to HTTP server with batching
Usage:
const { createLogger, transports, format } = require('winston')
const HttpBatchTransport = require('winston-http-batch-transport')
module.exports = createLogger({
format: format.combine(
format.timestamp(),
format.json()
),
transports: [
new transports.Console(),
new HttpBatchTransport({
url: 'http://google.com/log',
environment: 'production',
project: 'test',
batchSize: 100,
batchTimeout: 5 * 60 * 1000
})
],
exitOnError: false
})