]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/helpers/logger.ts
More robust channel change federation
[github/Chocobozzz/PeerTube.git] / server / helpers / logger.ts
index 05ec4a6b9ac4a34e301ddeb6647fa6ec29bbdbca..6917a64d969b073777a2d18ec778c9530b11397a 100644 (file)
@@ -27,6 +27,14 @@ function getLoggerReplacer () {
       seen.add(value)
     }
 
+    if (value instanceof Set) {
+      return Array.from(value)
+    }
+
+    if (value instanceof Map) {
+      return Array.from(value.entries())
+    }
+
     if (value instanceof Error) {
       const error = {}
 
@@ -53,7 +61,7 @@ const consoleLoggerFormat = winston.format.printf(info => {
     if (CONFIG.LOG.PRETTIFY_SQL) {
       additionalInfos += '\n' + sqlFormat(info.sql, {
         language: 'sql',
-        ident: '  '
+        indent: '  '
       })
     } else {
       additionalInfos += ' - ' + info.sql