Exporting ConsoleAdapter
This commit is contained in:
parent
6864756573
commit
8dec9e6d03
30
package-lock.json
generated
30
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hibas123/logging",
|
||||
"version": "2.0.0",
|
||||
"version": "2.0.3",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
@ -816,12 +816,14 @@
|
||||
"balanced-match": {
|
||||
"version": "1.0.0",
|
||||
"bundled": true,
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
@ -836,17 +838,20 @@
|
||||
"code-point-at": {
|
||||
"version": "1.1.0",
|
||||
"bundled": true,
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"concat-map": {
|
||||
"version": "0.0.1",
|
||||
"bundled": true,
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"console-control-strings": {
|
||||
"version": "1.1.0",
|
||||
"bundled": true,
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"core-util-is": {
|
||||
"version": "1.0.2",
|
||||
@ -963,7 +968,8 @@
|
||||
"inherits": {
|
||||
"version": "2.0.3",
|
||||
"bundled": true,
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"ini": {
|
||||
"version": "1.3.5",
|
||||
@ -975,6 +981,7 @@
|
||||
"version": "1.0.0",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"number-is-nan": "^1.0.0"
|
||||
}
|
||||
@ -989,6 +996,7 @@
|
||||
"version": "3.0.4",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
}
|
||||
@ -996,12 +1004,14 @@
|
||||
"minimist": {
|
||||
"version": "0.0.8",
|
||||
"bundled": true,
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"minipass": {
|
||||
"version": "2.3.5",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"safe-buffer": "^5.1.2",
|
||||
"yallist": "^3.0.0"
|
||||
@ -1020,6 +1030,7 @@
|
||||
"version": "0.5.1",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"minimist": "0.0.8"
|
||||
}
|
||||
@ -1100,7 +1111,8 @@
|
||||
"number-is-nan": {
|
||||
"version": "1.0.1",
|
||||
"bundled": true,
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"object-assign": {
|
||||
"version": "4.1.1",
|
||||
@ -1112,6 +1124,7 @@
|
||||
"version": "1.4.0",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"wrappy": "1"
|
||||
}
|
||||
@ -1233,6 +1246,7 @@
|
||||
"version": "1.0.2",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"code-point-at": "^1.0.0",
|
||||
"is-fullwidth-code-point": "^1.0.0",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@hibas123/logging",
|
||||
"version": "2.0.1",
|
||||
"version": "2.0.3",
|
||||
"description": "",
|
||||
"main": "out/index.js",
|
||||
"types": "out/index.d.ts",
|
||||
@ -18,6 +18,12 @@
|
||||
},
|
||||
"author": "Fabian Stamm",
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"src/",
|
||||
"out/",
|
||||
"tsconfig.json",
|
||||
"readme.md"
|
||||
],
|
||||
"devDependencies": {
|
||||
"concurrently": "^4.1.0",
|
||||
"nodemon": "^1.18.10",
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Observable } from "@hibas123/utils";
|
||||
import { ConsoleWriter } from "./consolewriter";
|
||||
import { ConsoleAdapter } from "./consolewriter";
|
||||
import inspect from "./inspect";
|
||||
import { Adapter, LoggingTypes, Message, FormatConfig, DefaultFormatConfig, Format, FormatTypes, Colors, FormattedText, FormattedLine } from "./types";
|
||||
|
||||
@ -68,7 +68,7 @@ export class LoggingBase {
|
||||
}
|
||||
|
||||
if (config.console) {
|
||||
this.addAdapter(new ConsoleWriter());
|
||||
this.addAdapter(new ConsoleAdapter());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,7 @@ import { Adapter, Message, FormattedLine, TerminalFormats, FormatTypes } from ".
|
||||
|
||||
const browser = typeof window !== "undefined";
|
||||
|
||||
export class ConsoleWriter implements Adapter {
|
||||
export class ConsoleAdapter implements Adapter {
|
||||
init(observable: ObservableInterface<Message>) {
|
||||
observable.subscribe(this.onMessage.bind(this));
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { LoggingBase } from "./base";
|
||||
|
||||
export { ConsoleAdapter } from "./consolewriter";
|
||||
export { LoggingBase, LoggingBaseOptions, removeColors } from "./base";
|
||||
export {
|
||||
Adapter,
|
||||
|
Loading…
Reference in New Issue
Block a user