From e15539b45debcd8fa7d9e8a33ab08784ac3cbe94 Mon Sep 17 00:00:00 2001 From: nkzawa Date: Fri, 11 Oct 2019 16:29:19 +0900 Subject: [PATCH] don't remove line feeds --- index.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/index.ts b/index.ts index c707cdc..a3fbd11 100644 --- a/index.ts +++ b/index.ts @@ -925,13 +925,10 @@ export class RFC3164 extends RFC { } let fmtMsg = ''; // Formatted Syslog message string var const newLine = '\n'; - const newLineRegEx = /(\r|\n|(\r\n))/; const escapeCode = '\u001B'; const resetColor = '\u001B[0m'; // The PRI is common to both RFC formats const pri = (this.facility * 8) + severity; - // Remove any newline character - msg = msg.replace(newLineRegEx, ''); // Add requested color if (this.color) { options.msgColor = options.msgColor || 36; @@ -1368,13 +1365,10 @@ export class RFC5424 extends RFC { let id = options.id || '-'; let fmtMsg = ''; // Formated Syslog message string var const newLine = '\n'; - const newLineRegEx = /(\r|\n|(\r\n))/; const escapeCode = '\u001B'; const resetColor = '\u001B[0m'; // The PRI is common to both RFC formats const pri = (facility * 8) + severity; - // Remove any newline character - msg = msg.replace(newLineRegEx, ''); // Add requested color if (this.color) { options.msgColor = options.msgColor || 36;