Exciting news!Announcing our $4.6M Series Seed. Learn more
Socket
LoveBlogFAQ
Install
Log in

@redpill-paris/winston-limit-transport

Package Overview
Dependencies
2
Maintainers
3
Versions
1
Issues
File Explorer

Advanced tools

@redpill-paris/winston-limit-transport

package limiting the duplication of logs

    1.0.1latest

Version published
Maintainers
3
Yearly downloads
4,698
increased by1040.29%

Weekly downloads

Readme

Source

winston-limit-transport

A logger transport for winston limiting same messages in logs. Reducing your cost and readability in your loggers.

Install

yarn add @redpill-paris/winston-limit-transport

Configuration

const winston = require('winston'); const WinstonLimit = require('@redpill-paris/winston-limit-transport'); const logger = winston.createLogger({ level: 'debug', transports: [ new WinstonLimit({ timeout: 500, // time between two same logs transport: new winston.transports.Console({ handleExceptions: true, }), // transport to be used if the log is not limited }), ], }); logger.info('Logger init finish');

TODO

  • Include metadata in the hash of the limiter(Only the message is compared to previous logs)
  • Emit to a stream when a log is limited

Keywords

Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc