diff options
Diffstat (limited to 'server/helpers/audit-logger.ts')
-rw-r--r-- | server/helpers/audit-logger.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/helpers/audit-logger.ts b/server/helpers/audit-logger.ts index f536da439..9b258dc3a 100644 --- a/server/helpers/audit-logger.ts +++ b/server/helpers/audit-logger.ts | |||
@@ -9,6 +9,7 @@ import { User, VideoAbuse, VideoChannel, VideoDetails, VideoImport } from '../.. | |||
9 | import { VideoComment } from '../../shared/models/videos/video-comment.model' | 9 | import { VideoComment } from '../../shared/models/videos/video-comment.model' |
10 | import { CustomConfig } from '../../shared/models/server/custom-config.model' | 10 | import { CustomConfig } from '../../shared/models/server/custom-config.model' |
11 | import { CONFIG } from '../initializers/config' | 11 | import { CONFIG } from '../initializers/config' |
12 | import { AUDIT_LOG_FILENAME } from '@server/initializers/constants' | ||
12 | 13 | ||
13 | function getAuditIdFromRes (res: express.Response) { | 14 | function getAuditIdFromRes (res: express.Response) { |
14 | return res.locals.oauth.token.User.username | 15 | return res.locals.oauth.token.User.username |
@@ -29,7 +30,7 @@ const auditLogger = winston.createLogger({ | |||
29 | levels: { audit: 0 }, | 30 | levels: { audit: 0 }, |
30 | transports: [ | 31 | transports: [ |
31 | new winston.transports.File({ | 32 | new winston.transports.File({ |
32 | filename: path.join(CONFIG.STORAGE.LOG_DIR, 'peertube-audit.log'), | 33 | filename: path.join(CONFIG.STORAGE.LOG_DIR, AUDIT_LOG_FILENAME), |
33 | level: 'audit', | 34 | level: 'audit', |
34 | maxsize: 5242880, | 35 | maxsize: 5242880, |
35 | maxFiles: 5, | 36 | maxFiles: 5, |