aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/helpers/logger.ts6
-rw-r--r--server/initializers/config.ts7
2 files changed, 9 insertions, 4 deletions
diff --git a/server/helpers/logger.ts b/server/helpers/logger.ts
index c2ff2bae6..395417612 100644
--- a/server/helpers/logger.ts
+++ b/server/helpers/logger.ts
@@ -67,9 +67,9 @@ const fileLoggerOptions: FileTransportOptions = {
67 ) 67 )
68} 68}
69 69
70if (CONFIG.LOG.ROTATION) { 70if (CONFIG.LOG.ROTATION.ENABLED) {
71 fileLoggerOptions.maxsize = 1024 * 1024 * 12 71 fileLoggerOptions.maxsize = CONFIG.LOG.ROTATION.MAX_FILE_SIZE
72 fileLoggerOptions.maxFiles = 20 72 fileLoggerOptions.maxFiles = CONFIG.LOG.ROTATION.MAX_FILES
73} 73}
74 74
75const logger = winston.createLogger({ 75const logger = winston.createLogger({
diff --git a/server/initializers/config.ts b/server/initializers/config.ts
index c6e478f57..95b069533 100644
--- a/server/initializers/config.ts
+++ b/server/initializers/config.ts
@@ -93,7 +93,12 @@ const CONFIG = {
93 TRUST_PROXY: config.get<string[]>('trust_proxy'), 93 TRUST_PROXY: config.get<string[]>('trust_proxy'),
94 LOG: { 94 LOG: {
95 LEVEL: config.get<string>('log.level'), 95 LEVEL: config.get<string>('log.level'),
96 ROTATION: config.get<boolean>('log.rotation.enabled') 96 ROTATION: {
97 ENABLED: config.get<boolean>('log.rotation.enabled'),
98 MAX_FILE_SIZE: bytes.parse(config.get<string>('log.rotation.maxFileSize')),
99 MAX_FILES: config.get<number>('log.rotation.maxFiles')
100 },
101 ANONYMIZE_IP: config.get<boolean>('log.anonymizeIP')
97 }, 102 },
98 SEARCH: { 103 SEARCH: {
99 REMOTE_URI: { 104 REMOTE_URI: {