superaugment
Version:
Enterprise-grade MCP server with world-class C++ analysis, robust error handling, and production-ready architecture for VS Code Augment
29 lines • 1.14 kB
JavaScript
import winston from 'winston';
// Create logger instance
export const logger = winston.createLogger({
level: process.env['LOG_LEVEL'] || 'info',
format: winston.format.combine(winston.format.timestamp(), winston.format.errors({ stack: true }), winston.format.json()),
defaultMeta: { service: 'superaugment-mcp' },
transports: [
// Write all logs with importance level of `error` or less to `error.log`
new winston.transports.File({
filename: 'logs/error.log',
level: 'error',
maxsize: 5242880, // 5MB
maxFiles: 5
}),
// Write all logs with importance level of `info` or less to `combined.log`
new winston.transports.File({
filename: 'logs/combined.log',
maxsize: 5242880, // 5MB
maxFiles: 5
}),
],
});
// If we're not in production, log to the console as well
if (process.env['NODE_ENV'] !== 'production') {
logger.add(new winston.transports.Console({
format: winston.format.combine(winston.format.colorize(), winston.format.simple())
}));
}
//# sourceMappingURL=logger.js.map