Update index.ts
This commit is contained in:
parent
e69f09c9c6
commit
1bf45ba20d
1 changed files with 5 additions and 1 deletions
|
@ -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({
|
|||
}),
|
||||
],
|
||||
});
|
||||
}}
|
||||
|
|
Loading…
Add table
Reference in a new issue