mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 08:50:15 +01:00
feat: Logins log for Fail2Ban (#986)
* login logs and output * fix(merge) * fix(wiston) unistall * fix(winston) installation in api * fix(logger) new module
This commit is contained in:
parent
7c0379ba51
commit
1bf6c259b9
5 changed files with 198 additions and 27 deletions
12
api/utils/logger.js
Normal file
12
api/utils/logger.js
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
const winston = require('winston');
|
||||
|
||||
const logger = winston.createLogger({
|
||||
level: 'info',
|
||||
format: winston.format.combine(winston.format.timestamp(), winston.format.json()),
|
||||
transports: [
|
||||
new winston.transports.Console(),
|
||||
new winston.transports.File({ filename: 'login-logs.log' }),
|
||||
],
|
||||
});
|
||||
|
||||
module.exports = logger;
|
||||
Loading…
Add table
Add a link
Reference in a new issue