winstonjs / winston

A logger for just about everything.
http://github.com/winstonjs/winston
MIT License
22.89k stars 1.81k forks source link

Winston 3.0.0 still halts logging in high stress. Makes it unusable for us. #1364

Open kramer65 opened 6 years ago

kramer65 commented 6 years ago

Please tell us about your environment:

This issue has been closed, but running the following code (which I also posted here) still stops Winston logs from working within a second or so:

"use strict";

let winston = require('winston');

const myFormat = winston.format.printf(info => {
    return `${info.timestamp} ${info.level}: ${info.message}`;
});
const logger = winston.createLogger({
    level: 'info',
    format: winston.format.timestamp(),
    transports: [
        new winston.transports.File({filename: 'logs/combined.log'}),
        new winston.transports.Console({format: winston.format.combine(winston.format.timestamp(), myFormat), level: 'debug'})
    ]
});

while (true) {
    let random_string = Math.random().toString(36).substring(7);
    logger.info(random_string);  // This one stops after a while
    console.log(random_string);  // while this one continues to function properly
}