diff options
author | Chocobozzz <me@florianbigard.com> | 2020-11-25 14:43:18 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-11-25 14:43:43 +0100 |
commit | a9d4c3c8ca07e3f7793c9e55a8fa2d0fa8ee56df (patch) | |
tree | ae5e503fa1bd9db790fb7d2f890b058057655a66 /server/helpers/logger.ts | |
parent | fc4188746340b65b7615ca0dd07f81ed7a5e53cd (diff) | |
download | PeerTube-a9d4c3c8ca07e3f7793c9e55a8fa2d0fa8ee56df.tar.gz PeerTube-a9d4c3c8ca07e3f7793c9e55a8fa2d0fa8ee56df.tar.zst PeerTube-a9d4c3c8ca07e3f7793c9e55a8fa2d0fa8ee56df.zip |
Avoid too large cert error messages
Diffstat (limited to 'server/helpers/logger.ts')
-rw-r--r-- | server/helpers/logger.ts | 2 |
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 | ||