Fixing bug that caused newline in browser console
This commit is contained in:
parent
0c9ff9d018
commit
b1a1ab6783
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@hibas123/logging",
|
"name": "@hibas123/logging",
|
||||||
"version": "2.0.4",
|
"version": "2.0.5",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "out/index.js",
|
"main": "out/index.js",
|
||||||
"types": "out/index.d.ts",
|
"types": "out/index.d.ts",
|
||||||
|
@ -128,13 +128,13 @@ export class ConsoleAdapter implements Adapter {
|
|||||||
if (message.name) prefix = `[${message.name}]=>`;
|
if (message.name) prefix = `[${message.name}]=>`;
|
||||||
|
|
||||||
if (browser) {
|
if (browser) {
|
||||||
let text = "";
|
|
||||||
let formats: string[] = [];
|
let formats: string[] = [];
|
||||||
lines.forEach(line => {
|
let text = lines.map(line => {
|
||||||
let [t, fmts] = this.formatLine(line);
|
let [t, fmts] = this.formatLine(line);
|
||||||
text += t + "\n";
|
|
||||||
formats.push(...fmts);
|
formats.push(...fmts);
|
||||||
})
|
return t;
|
||||||
|
}).join("\n");
|
||||||
// console.log(formats);
|
// console.log(formats);
|
||||||
console.log(text, ...formats);
|
console.log(text, ...formats);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user