From 82cff60b68a55ec363eb95dd919fe5f43458d8cc Mon Sep 17 00:00:00 2001 From: Fabian Stamm Date: Sat, 21 Oct 2017 14:40:54 +0200 Subject: [PATCH] Adding multi line stack trace in console, not in file --- out/index.js | 4 ++-- out/index.js.map | 2 +- package.json | 2 +- src/index.ts | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/out/index.js b/out/index.js index ef87793..f8f8cc2 100644 --- a/out/index.js +++ b/out/index.js @@ -51,7 +51,7 @@ class Logging { } let m = ""; error.stack.forEach(e => { - m += e.toString() + " | "; + m += e.toString() + "\n"; }); var message = error.name + " " + error.message + "\n" + m; Logging.message(LoggingTypes.Error, [message]); @@ -108,7 +108,7 @@ class Logging { console.log(consoleLogFormat + m + Reset); } static writeMessageToFile(message, error) { - Logging.queue.push({ message: message.replace("\n", ""), error: error }); + Logging.queue.push({ message: message.replace("\n", " "), error: error }); Logging.checkQueue(); } static checkQueue() { diff --git a/out/index.js.map b/out/index.js.map index 1749477..cf8a4df 100644 --- a/out/index.js.map +++ b/out/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,6BAA6B;AAC7B,yBAAyB;AACzB,mCAAsC;AACtC,6BAA6B;AAE7B,MAAM,KAAK,GAAG,SAAS,CAAA;AACvB,MAAM,MAAM,GAAG,SAAS,CAAA;AACxB,MAAM,GAAG,GAAG,SAAS,CAAA;AACrB,MAAM,UAAU,GAAG,SAAS,CAAA;AAC5B,MAAM,KAAK,GAAG,SAAS,CAAA;AACvB,MAAM,OAAO,GAAG,SAAS,CAAA;AACzB,MAAM,MAAM,GAAG,SAAS,CAAA;AAExB,MAAM,OAAO,GAAG,UAAU,CAAA;AAC1B,MAAM,KAAK,GAAG,UAAU,CAAA;AACxB,MAAM,OAAO,GAAG,UAAU,CAAA;AAC1B,MAAM,QAAQ,GAAG,UAAU,CAAA;AAC3B,MAAM,MAAM,GAAG,UAAU,CAAA;AAC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IAAI,YAAoB,CAAC;QAEnB,KAAM,CAAC,iBAAiB,GAAG,UAAU,GAAG,EAAE,KAAK,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAEzE,YAAY,GAAS,GAAG,CAAC,KAAM,CAAC,KAAK,EAAE,CAAC,WAAW,EAAE,CAAC;QAEtD,OAAO,GAAG,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;YACvB,WAAW,GAAS,GAAG,CAAC,KAAM,CAAC,KAAK,EAAE,CAAC,WAAW,EAAE,CAAC;YACrD,EAAE,CAAC,CAAC,YAAY,KAAK,WAAW,CAAC;gBAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;QACvE,CAAC;IACJ,CAAC;IAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACjB,MAAM,CAAC,SAAS,CAAC;AACpB,CAAC;AAED,IAAY,YAKX;AALD,WAAY,YAAY;IACrB,6CAAG,CAAA;IACH,qDAAO,CAAA;IACP,iDAAK,CAAA;IACL,iDAAK,CAAA;AACR,CAAC,EALW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAKvB"} \ No newline at end of file diff --git a/package.json b/package.json index f824b81..a3ac1b4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "logger-perfcloud", - "version": "1.0.6", + "version": "1.0.8", "description": "", "main": "out/index.js", "types": "out/index.d.ts", diff --git a/src/index.ts b/src/index.ts index 6251466..e07fd7b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -69,7 +69,7 @@ export class Logging { } let m = ""; (error.stack).forEach(e => { - m += e.toString() + " | "; + m += e.toString() + "\n"; }) var message = error.name + " " + error.message + "\n" + m; Logging.message(LoggingTypes.Error, [message]); @@ -125,7 +125,7 @@ export class Logging { } private static writeMessageToFile(message: string, error?: boolean) { - Logging.queue.push({ message: message.replace("\n", ""), error: error }); + Logging.queue.push({ message: message.replace("\n", " "), error: error }); Logging.checkQueue(); }