@larvit/log 1.0.4 → 1.1.0
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/index.ts +6 -6
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
type Metadata = {
|
|
1
|
+
export type Metadata = {
|
|
2
2
|
[key: string]: string;
|
|
3
3
|
}
|
|
4
4
|
|
|
5
|
-
type LogShorthand = (msg: string, metadata?: Metadata) => void;
|
|
5
|
+
export type LogShorthand = (msg: string, metadata?: Metadata) => void;
|
|
6
6
|
|
|
7
|
-
interface LogInt {
|
|
7
|
+
export interface LogInt {
|
|
8
8
|
/* eslint-disable typescript-sort-keys/interface */
|
|
9
9
|
error: LogShorthand;
|
|
10
10
|
warn: LogShorthand;
|
|
@@ -15,15 +15,15 @@ interface LogInt {
|
|
|
15
15
|
/* eslint-enable typescript-sort-keys/interface */
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
type LogLevel = keyof LogInt;
|
|
18
|
+
export type LogLevel = keyof LogInt;
|
|
19
19
|
|
|
20
|
-
type EntryFormatterConf = {
|
|
20
|
+
export type EntryFormatterConf = {
|
|
21
21
|
logLevel: LogLevel;
|
|
22
22
|
metadata?: Metadata;
|
|
23
23
|
msg: string;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
type LogConf = {
|
|
26
|
+
export type LogConf = {
|
|
27
27
|
context?: Metadata;
|
|
28
28
|
entryFormatter?: (conf: EntryFormatterConf) => string;
|
|
29
29
|
format?: "text" | "json";
|