mirror of
https://github.com/cloudmaker97/FS25-Discord-Bot.git
synced 2025-12-06 00:18:34 +00:00
20 lines
No EOL
641 B
TypeScript
20 lines
No EOL
641 B
TypeScript
import winston, {Logger} from "winston";
|
|
|
|
export default class Logging {
|
|
public static getLogger(): Logger {
|
|
return winston.createLogger({
|
|
level: 'info',
|
|
format: winston.format.combine(
|
|
winston.format.timestamp({
|
|
format: 'YYYY-MM-DD HH:mm:ss'
|
|
}),
|
|
winston.format.colorize(),
|
|
winston.format.simple(),
|
|
winston.format.printf(info => `${info.timestamp} ${info.level}: ${info.message}`)
|
|
),
|
|
transports: [
|
|
new winston.transports.Console(),
|
|
]
|
|
});
|
|
}
|
|
} |