Compare commits
No commits in common. "b647b8fae6b2890d2093c02ab578aa0381833d49" and "facb7e7b403e1dfaa8790426259e6effb0618efb" have entirely different histories.
b647b8fae6
...
facb7e7b40
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hibas123/logging",
|
||||
"version": "2.1.5",
|
||||
"version": "2.1.4",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -1,19 +1,11 @@
|
||||
import { ObservableInterface } from "@hibas123/utils";
|
||||
import { Colors } from "./index";
|
||||
import {
|
||||
<<<<<<< HEAD
|
||||
Adapter,
|
||||
Message,
|
||||
FormattedLine,
|
||||
TerminalFormats,
|
||||
FormatTypes
|
||||
=======
|
||||
Adapter,
|
||||
Message,
|
||||
FormattedLine,
|
||||
TerminalFormats,
|
||||
FormatTypes,
|
||||
>>>>>>> facb7e7b403e1dfaa8790426259e6effb0618efb
|
||||
} from "./types";
|
||||
|
||||
const browser = typeof window !== "undefined";
|
||||
@ -23,11 +15,7 @@ export class ConsoleAdapter implements Adapter {
|
||||
observable.subscribe(this.onMessage.bind(this));
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
flush() {}
|
||||
=======
|
||||
flush() {}
|
||||
>>>>>>> facb7e7b403e1dfaa8790426259e6effb0618efb
|
||||
|
||||
// TODO: Check if required!
|
||||
// private escape(text: string): string {
|
||||
@ -148,16 +136,16 @@ export class ConsoleAdapter implements Adapter {
|
||||
if (browser) {
|
||||
let formats: string[] = [];
|
||||
let text = lines
|
||||
.map(line => {
|
||||
.map((line) => {
|
||||
let [t, fmts] = this.formatLine(line);
|
||||
formats.push(...fmts);
|
||||
return prefix + t;
|
||||
return t;
|
||||
})
|
||||
.join("\n");
|
||||
// console.log(formats);
|
||||
console.log(text, ...formats);
|
||||
} else {
|
||||
lines.forEach(line => {
|
||||
lines.forEach((line) => {
|
||||
let [text] = this.formatLine(line);
|
||||
console.log(prefix + text);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user