We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Environment: winston 3.13.0 Windows 11 node v20.5.1
If I use format inside new winston.transports.Console() the Error is undefined:
format
new winston.transports.Console()
undefined
import winston from 'winston' const logger = winston.createLogger({ transports: [new winston.transports.Console()], format: winston.format.printf((info) => { return `${info.level}: ${info.message}` }) }) const logger2 = winston.createLogger({ transports: [new winston.transports.Console({ format: winston.format.printf((info) => { return `${info.level}: ${info.message}` }) } )], }) logger.info('test') logger2.info('test') try { throw new Error('oh no!') } catch (err) { logger.error(err) logger2.error(err) }
Output:
info: test info: test error: oh no! error: undefined
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Environment:
winston 3.13.0
Windows 11
node v20.5.1
If I use
format
insidenew winston.transports.Console()
the Error isundefined
:Output:
The text was updated successfully, but these errors were encountered: