Refactor logging implementation and enhance authentication logging

This commit is contained in:
2025-01-30 22:02:35 +01:00
parent 2ebf92a5d5
commit 23a6d9b10f
5 changed files with 38 additions and 27 deletions

View File

@@ -4,13 +4,13 @@ const logger = createLogger({
level: 'info',
format: format.combine(
format.timestamp(),
format.json()
format.printf(info => `${info.timestamp} ${info.level}: ${info.message}`)
),
transports: [
new transports.Console(),
new transports.File({ filename: 'app.log' })
new transports.File({ filename: '/data/app.log' })
]
});
});
module.exports = logger;