Fixing bug that caused newline in browser console
This commit is contained in:
parent
0c9ff9d018
commit
b1a1ab6783
@ -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",
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user