@thi.ng/rstream-log 5.0.4 → 5.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -1
- package/README.md +1 -1
- package/format.d.ts +4 -0
- package/logger.d.ts +3 -2
- package/logger.js +4 -2
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
package/format.d.ts
CHANGED
|
@@ -12,6 +12,10 @@ export declare const formatString: (dtFmt?: DateFormat, bodyFmt?: BodyFormat) =>
|
|
|
12
12
|
*
|
|
13
13
|
* @example
|
|
14
14
|
* ```ts
|
|
15
|
+
* import { Logger, formatString, maskSecrets, writeConsole } from "@thi.ng/rstream-log";
|
|
16
|
+
*
|
|
17
|
+
* const logger = new Logger();
|
|
18
|
+
*
|
|
15
19
|
* logger.transform(
|
|
16
20
|
* formatString(),
|
|
17
21
|
* maskSecrets([/(?<=[A-Z0-9_]\=)\w+/g])
|
package/logger.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ALogger } from "@thi.ng/logger/alogger";
|
|
2
2
|
import { LogLevel, type ILogger, type LogEntry, type LogLevelName } from "@thi.ng/logger/api";
|
|
3
|
-
import {
|
|
3
|
+
import { type ISubscriber } from "@thi.ng/rstream/api";
|
|
4
|
+
import { Stream } from "@thi.ng/rstream/stream";
|
|
4
5
|
export declare class Logger extends ALogger implements ISubscriber<LogEntry> {
|
|
5
6
|
stream: Stream<LogEntry>;
|
|
6
|
-
constructor(id
|
|
7
|
+
constructor(id?: string, level?: LogLevel | LogLevelName, parent?: ILogger);
|
|
7
8
|
next(x: LogEntry): void;
|
|
8
9
|
done(): void;
|
|
9
10
|
error(e: Error): boolean;
|
package/logger.js
CHANGED
|
@@ -2,11 +2,13 @@ import { ALogger } from "@thi.ng/logger/alogger";
|
|
|
2
2
|
import {
|
|
3
3
|
LogLevel
|
|
4
4
|
} from "@thi.ng/logger/api";
|
|
5
|
-
import { CloseMode
|
|
5
|
+
import { CloseMode } from "@thi.ng/rstream/api";
|
|
6
|
+
import { Stream } from "@thi.ng/rstream/stream";
|
|
7
|
+
import { __nextID } from "@thi.ng/rstream/idgen";
|
|
6
8
|
class Logger extends ALogger {
|
|
7
9
|
stream;
|
|
8
10
|
constructor(id, level, parent) {
|
|
9
|
-
super(id
|
|
11
|
+
super(id || `logger-${__nextID()}`, level, parent);
|
|
10
12
|
this.stream = new Stream({
|
|
11
13
|
id: this.id,
|
|
12
14
|
closeOut: CloseMode.NEVER
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/rstream-log",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.6",
|
|
4
4
|
"description": "Structured, multilevel & hierarchical loggers based on @thi.ng/rstream",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
"test": "bun test"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@thi.ng/api": "^8.9.
|
|
38
|
+
"@thi.ng/api": "^8.9.26",
|
|
39
39
|
"@thi.ng/checks": "^3.5.0",
|
|
40
|
-
"@thi.ng/logger": "^3.0.
|
|
41
|
-
"@thi.ng/rstream": "^8.3.
|
|
42
|
-
"@thi.ng/strings": "^3.7.
|
|
43
|
-
"@thi.ng/transducers": "^8.9.
|
|
40
|
+
"@thi.ng/logger": "^3.0.3",
|
|
41
|
+
"@thi.ng/rstream": "^8.3.8",
|
|
42
|
+
"@thi.ng/strings": "^3.7.17",
|
|
43
|
+
"@thi.ng/transducers": "^8.9.7"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@microsoft/api-extractor": "^7.40.1",
|
|
@@ -97,5 +97,5 @@
|
|
|
97
97
|
],
|
|
98
98
|
"year": 2017
|
|
99
99
|
},
|
|
100
|
-
"gitHead": "
|
|
100
|
+
"gitHead": "6e20f80dd9df1c8055ffa3c1e4d6f7598add0c0b\n"
|
|
101
101
|
}
|