Hide message numbers from non-verbose logs
parent
c7b49b5484
commit
3aa74f2cbf
|
@ -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}`;
|
||||||
|
|
Loading…
Reference in New Issue