The problem
For visibility, this is a duplicate of winstonjs/winston#2441 I'm not sure which repo is the correct one to create this in.
What version of Logform presents the issue?
v2.6.0
What version of Node are you using?
v20.10.0
If this is a TypeScript issue, what version of TypeScript are you using?
v5.3.3
If this worked in a previous version of Logform, which was it?
No response
Minimum Working Example
const winston = require('winston');
const logger = winston.createLogger({
level: 'info',
format: winston.format.combine(
winston.format.json(),
winston.format((input) => {
let lagger = 0;
for (let i = 0; i < 1000000000; i++) {
lagger += 1;
}
return input;
})()
),
defaultMeta: { service: 'user-service' },
transports: [
new winston.transports.Console({
format: winston.format.simple(),
})
],
});
setInterval(() => {
// I still see formatter for this log in profiler taking up some seconds
logger.debug('Hello world!');
}, 1000);
Additional information
This bug causes performance issues.
🔎 Search Terms
bug, performance, winston, winstonjs, formatter
The problem
For visibility, this is a duplicate of winstonjs/winston#2441 I'm not sure which repo is the correct one to create this in.
What version of Logform presents the issue?
v2.6.0
What version of Node are you using?
v20.10.0
If this is a TypeScript issue, what version of TypeScript are you using?
v5.3.3
If this worked in a previous version of Logform, which was it?
No response
Minimum Working Example
Additional information
This bug causes performance issues.
🔎 Search Terms
bug, performance, winston, winstonjs, formatter