From 51785e2b133b7ec5493d4eaa8584398d58c275f9 Mon Sep 17 00:00:00 2001 From: Fabian Stamm Date: Sun, 17 Nov 2019 16:09:35 +0100 Subject: [PATCH] Fixing missing raw message --- package.json | 2 +- src/base.ts | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 28e2348..70858f4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@hibas123/logging", - "version": "2.0.7", + "version": "2.0.8", "description": "", "main": "out/index.js", "types": "out/index.d.ts", diff --git a/src/base.ts b/src/base.ts index 303fb8c..15cc12d 100644 --- a/src/base.ts +++ b/src/base.ts @@ -168,13 +168,15 @@ export class LoggingBase { a("]: "); - let mb = ""; + let raw: string[] = []; const formatted: FormattedLine[] = []; let line: FormattedLine; const newLine = () => { - if (line && line.length > 0) + if (line && line.length > 0) { formatted.push(line); + raw.push(line.map(e => e.text).join("")); + } line = [...prefix]; } newLine(); @@ -209,9 +211,6 @@ export class LoggingBase { newLine(); - let raw = removeColors(mb).split("\n"); - - let msg: Message = { date: new Date(), file,