diff --git a/package.json b/package.json index 000837c..b3d07d1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@hibas123/logging", - "version": "2.0.4", + "version": "2.0.5", "description": "", "main": "out/index.js", "types": "out/index.d.ts", diff --git a/src/consolewriter.ts b/src/consolewriter.ts index a4177ad..791a9cf 100644 --- a/src/consolewriter.ts +++ b/src/consolewriter.ts @@ -128,13 +128,13 @@ export class ConsoleAdapter implements Adapter { if (message.name) prefix = `[${message.name}]=>`; if (browser) { - let text = ""; + let formats: string[] = []; - lines.forEach(line => { + let text = lines.map(line => { let [t, fmts] = this.formatLine(line); - text += t + "\n"; formats.push(...fmts); - }) + return t; + }).join("\n"); // console.log(formats); console.log(text, ...formats); } else {