@miketako3/cloki 0.1.16 → 0.1.17
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/dist/logger.d.ts +13 -3
- package/package.json +1 -1
package/dist/logger.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Loki config
|
|
3
3
|
*/
|
|
4
|
-
type LokiConfig = {
|
|
4
|
+
export type LokiConfig = {
|
|
5
5
|
lokiHost: string;
|
|
6
6
|
lokiToken: string;
|
|
7
7
|
lokiUser: string;
|
|
@@ -9,9 +9,20 @@ type LokiConfig = {
|
|
|
9
9
|
/**
|
|
10
10
|
* Loki labels
|
|
11
11
|
*/
|
|
12
|
-
type LokiLabels = {
|
|
12
|
+
export type LokiLabels = {
|
|
13
13
|
[key: string]: string;
|
|
14
14
|
};
|
|
15
|
+
/**
|
|
16
|
+
* Loki message
|
|
17
|
+
*/
|
|
18
|
+
export type LokiMessage = {
|
|
19
|
+
streams: [
|
|
20
|
+
{
|
|
21
|
+
stream: LokiLabels;
|
|
22
|
+
values: [string[]];
|
|
23
|
+
}
|
|
24
|
+
];
|
|
25
|
+
};
|
|
15
26
|
/**
|
|
16
27
|
* Create a Loki logger
|
|
17
28
|
* logger has some async logging methods like info, error, warn, etc.
|
|
@@ -24,4 +35,3 @@ export declare const getLokiLogger: (config: LokiConfig) => {
|
|
|
24
35
|
error: (message: object, labels?: LokiLabels) => Promise<void>;
|
|
25
36
|
debug: (message: object, labels?: LokiLabels) => Promise<void>;
|
|
26
37
|
};
|
|
27
|
-
export {};
|