-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Description
Please tell us about your environment:
- version
[email protected] node -voutputs:v8.10.0- Operating System:
Ubuntu 18.04 - Language:
ES6
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
}
LenonLopez, zoellner, kramer65, brihter, studiowebux and 11 more
Metadata
Metadata
Assignees
Labels
No labels