Hide message numbers from non-verbose logs

cshd
Dragory 2020-08-17 01:45:45 +03:00
parent c7b49b5484
commit 3aa74f2cbf
No known key found for this signature in database
GPG Key ID: 5F387BA66DF8AAC1
1 changed files with 6 additions and 1 deletions

View File

@ -164,7 +164,12 @@ const defaultFormatters = {
if (message.message_type === THREAD_MESSAGE_TYPE.FROM_USER) { if (message.message_type === THREAD_MESSAGE_TYPE.FROM_USER) {
line += ` [FROM USER] [${message.user_name}] ${message.body}`; line += ` [FROM USER] [${message.user_name}] ${message.body}`;
} else if (message.message_type === THREAD_MESSAGE_TYPE.TO_USER) { } 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) { 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 // Legacy format (from pre-2.31.0) includes the role and username in the message body, so serve that as is
line += ` ${message.body}`; line += ` ${message.body}`;