aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-11-25 14:43:18 +0100
committerChocobozzz <me@florianbigard.com>2020-11-25 14:43:43 +0100
commita9d4c3c8ca07e3f7793c9e55a8fa2d0fa8ee56df (patch)
treeae5e503fa1bd9db790fb7d2f890b058057655a66
parentfc4188746340b65b7615ca0dd07f81ed7a5e53cd (diff)
downloadPeerTube-a9d4c3c8ca07e3f7793c9e55a8fa2d0fa8ee56df.tar.gz
PeerTube-a9d4c3c8ca07e3f7793c9e55a8fa2d0fa8ee56df.tar.zst
PeerTube-a9d4c3c8ca07e3f7793c9e55a8fa2d0fa8ee56df.zip
Avoid too large cert error messages
-rw-r--r--server/helpers/logger.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/server/helpers/logger.ts b/server/helpers/logger.ts
index 9553f70e8..a4bd41427 100644
--- a/server/helpers/logger.ts
+++ b/server/helpers/logger.ts
@@ -18,6 +18,8 @@ function getLoggerReplacer () {
18 18
19 // Thanks: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Cyclic_object_value#Examples 19 // Thanks: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Cyclic_object_value#Examples
20 return (key: string, value: any) => { 20 return (key: string, value: any) => {
21 if (key === 'cert') return 'Replaced by the logger to avoid large log message'
22
21 if (typeof value === 'object' && value !== null) { 23 if (typeof value === 'object' && value !== null) {
22 if (seen.has(value)) return 24 if (seen.has(value)) return
23 25