diff options
author | Chocobozzz <me@florianbigard.com> | 2019-12-11 14:14:01 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-12-11 14:14:01 +0100 |
commit | 566c125d6eee3bd907404523d94e1e0b5e403a46 (patch) | |
tree | c477cdd2ba745015d80052968c37927b1bca1254 /server/helpers/logger.ts | |
parent | 92e0f42e8ce5f1ab5e4023900b8194627231a11b (diff) | |
download | PeerTube-566c125d6eee3bd907404523d94e1e0b5e403a46.tar.gz PeerTube-566c125d6eee3bd907404523d94e1e0b5e403a46.tar.zst PeerTube-566c125d6eee3bd907404523d94e1e0b5e403a46.zip |
Serve audit logs to client
Diffstat (limited to 'server/helpers/logger.ts')
-rw-r--r-- | server/helpers/logger.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/helpers/logger.ts b/server/helpers/logger.ts index d21746963..c2ff2bae6 100644 --- a/server/helpers/logger.ts +++ b/server/helpers/logger.ts | |||
@@ -5,6 +5,7 @@ import * as winston from 'winston' | |||
5 | import { FileTransportOptions } from 'winston/lib/winston/transports' | 5 | import { FileTransportOptions } from 'winston/lib/winston/transports' |
6 | import { CONFIG } from '../initializers/config' | 6 | import { CONFIG } from '../initializers/config' |
7 | import { omit } from 'lodash' | 7 | import { omit } from 'lodash' |
8 | import { LOG_FILENAME } from '@server/initializers/constants' | ||
8 | 9 | ||
9 | const label = CONFIG.WEBSERVER.HOSTNAME + ':' + CONFIG.WEBSERVER.PORT | 10 | const label = CONFIG.WEBSERVER.HOSTNAME + ':' + CONFIG.WEBSERVER.PORT |
10 | 11 | ||
@@ -58,7 +59,7 @@ const labelFormatter = winston.format.label({ | |||
58 | }) | 59 | }) |
59 | 60 | ||
60 | const fileLoggerOptions: FileTransportOptions = { | 61 | const fileLoggerOptions: FileTransportOptions = { |
61 | filename: path.join(CONFIG.STORAGE.LOG_DIR, 'peertube.log'), | 62 | filename: path.join(CONFIG.STORAGE.LOG_DIR, LOG_FILENAME), |
62 | handleExceptions: true, | 63 | handleExceptions: true, |
63 | format: winston.format.combine( | 64 | format: winston.format.combine( |
64 | winston.format.timestamp(), | 65 | winston.format.timestamp(), |