Update index.ts

This commit is contained in:
Axel Olausson Holtenäs 2022-05-17 11:51:25 +02:00 committed by GitHub
parent e69f09c9c6
commit 1bf45ba20d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,7 +3,10 @@ import "winston-daily-rotate-file";
const { combine, timestamp, printf, colorize, align, json } = winston.format;
export default await winston.createLogger({
module.exports = {
// Logger initialized async-hronously
logger: async () => {
return winston.createLogger({
level: process.env.LOG_LEVEL || "silly",
transports: [
new winston.transports.DailyRotateFile({
@ -24,3 +27,4 @@ export default await winston.createLogger({
}),
],
});
}}