Complete the code to import Winston in an Express app.
const winston = require('[1]');
Winston is imported by requiring the 'winston' package.
Complete the code to create a Winston logger with console transport.
const logger = winston.createLogger({ transports: [new winston.transports.[1]()] });The Console transport sends logs to the console (terminal).
Fix the error in the code to log an info message using Winston.
logger.[1]('Server started successfully');
The 'info' method logs an informational message in Winston.
Fill both blanks to configure Winston to log errors to a file named 'error.log'.
const logger = winston.createLogger({ transports: [new winston.transports.[1]({ filename: '[2]' })] });The File transport writes logs to a file. Here, the file is 'error.log'.
Fill all three blanks to create a logger that logs info level to console and errors to 'error.log' file.
const logger = winston.createLogger({ level: '[1]', transports: [new winston.transports.[2](), new winston.transports.[3]({ filename: 'error.log', level: 'error' })] });The logger's default level is 'info'. Console transport logs info and above. File transport logs errors to 'error.log'.
