+const fileLoggerOptions: FileTransportOptions = {
+
+ filename: path.join(CONFIG.STORAGE.LOG_DIR, 'peertube.log'),
+ handleExceptions: true,
+ format: winston.format.combine(
+ winston.format.timestamp(),
+ jsonLoggerFormat
+ )
+}
+
+if (CONFIG.LOG.ROTATION) {
+ fileLoggerOptions.maxsize = 1024 * 1024 * 12
+ fileLoggerOptions.maxFiles = 20
+}
+
+const logger = winston.createLogger({