From 3aa74f2cbfbdf2d85326677fe899f4892d2f5db7 Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Mon, 17 Aug 2020 01:45:45 +0300 Subject: [PATCH] Hide message numbers from non-verbose logs --- src/formatters.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/formatters.js b/src/formatters.js index e749ed4..56d0946 100644 --- a/src/formatters.js +++ b/src/formatters.js @@ -164,7 +164,12 @@ const defaultFormatters = { if (message.message_type === THREAD_MESSAGE_TYPE.FROM_USER) { line += ` [FROM USER] [${message.user_name}] ${message.body}`; } else if (message.message_type === THREAD_MESSAGE_TYPE.TO_USER) { - line += ` [TO USER] [${message.message_number || "0"}] [${message.user_name}]`; + if (opts.verbose) { + line += ` [TO USER] [${message.message_number || "0"}] [${message.user_name}]`; + } else { + line += ` [TO USER] [${message.user_name}]`; + } + if (message.use_legacy_format) { // Legacy format (from pre-2.31.0) includes the role and username in the message body, so serve that as is line += ` ${message.body}`;