From 50dfa5c55f15a04b04a52532f6b249b71713a884 Mon Sep 17 00:00:00 2001 From: DimitarTachev Date: Thu, 20 Feb 2020 11:18:15 +0200 Subject: [PATCH] docs: warn when the log level is TRACE or ALL as the CLI might print sensitive data --- lib/common/logger/logger.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/common/logger/logger.ts b/lib/common/logger/logger.ts index 744d338b14..5d44771e9e 100644 --- a/lib/common/logger/logger.ts +++ b/lib/common/logger/logger.ts @@ -48,6 +48,9 @@ export class Logger implements ILogger { log4js.configure({ appenders, categories }); this.log4jsLogger = log4js.getLogger(); + if (level === LoggerLevel.TRACE || level === LoggerLevel.ALL) { + this.warn(`The "${level}" log level might print some sensitive data like secrets or access tokens in request URLs. Be careful when you share this output.`, { wrapMessageWithBorders: true }); + } } public initializeCliLogger(opts?: ILoggerOptions): void {