@putkoff/abstract-logger 0.0.17 → 0.0.19
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/cjs/index.js +42 -18
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/logger/logger.d.ts +11 -3
- package/dist/esm/index.js +42 -18
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/logger/logger.d.ts +11 -3
- package/dist/types/index.d.ts +11 -1
- package/dist/types/logger/logger.d.ts +11 -3
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type LogType = "info" | "warn" | "error" | "debug" | null;
|
|
1
|
+
export type LogType = "info" | "warn" | "error" | "debug" | null;
|
|
2
2
|
/** Exported logger */
|
|
3
3
|
export declare const logger: any;
|
|
4
4
|
/**
|
|
@@ -6,5 +6,13 @@ export declare const logger: any;
|
|
|
6
6
|
* Returns "unknown" ONLY if all inputs are invalid.
|
|
7
7
|
*/
|
|
8
8
|
export declare function resolveValue<T = string>(...values: Array<T | string | null | undefined>): T | "unknown";
|
|
9
|
-
export
|
|
10
|
-
|
|
9
|
+
export interface LogStringOptions {
|
|
10
|
+
message: string;
|
|
11
|
+
logType?: LogType;
|
|
12
|
+
details?: any;
|
|
13
|
+
function_name?: any;
|
|
14
|
+
file_location?: any;
|
|
15
|
+
consumerLogger?: any;
|
|
16
|
+
}
|
|
17
|
+
export declare function getLogString(options: LogStringOptions): string;
|
|
18
|
+
export declare function getLogString(messageOrOptions: string | LogStringOptions, logType?: LogType, details?: any, function_name?: any, file_location?: any, consumerLogger?: any): string;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -6,6 +6,16 @@ declare const logger: any;
|
|
|
6
6
|
* Returns "unknown" ONLY if all inputs are invalid.
|
|
7
7
|
*/
|
|
8
8
|
declare function resolveValue<T = string>(...values: Array<T | string | null | undefined>): T | "unknown";
|
|
9
|
-
|
|
9
|
+
interface LogStringOptions {
|
|
10
|
+
message: string;
|
|
11
|
+
logType?: LogType;
|
|
12
|
+
details?: any;
|
|
13
|
+
function_name?: any;
|
|
14
|
+
file_location?: any;
|
|
15
|
+
consumerLogger?: any;
|
|
16
|
+
}
|
|
17
|
+
declare function getLogString(options: LogStringOptions): string;
|
|
18
|
+
declare function getLogString(messageOrOptions: string | LogStringOptions, logType?: LogType, details?: any, function_name?: any, file_location?: any, consumerLogger?: any): string;
|
|
10
19
|
|
|
11
20
|
export { getLogString, logger, resolveValue };
|
|
21
|
+
export type { LogStringOptions, LogType };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type LogType = "info" | "warn" | "error" | "debug" | null;
|
|
1
|
+
export type LogType = "info" | "warn" | "error" | "debug" | null;
|
|
2
2
|
/** Exported logger */
|
|
3
3
|
export declare const logger: any;
|
|
4
4
|
/**
|
|
@@ -6,5 +6,13 @@ export declare const logger: any;
|
|
|
6
6
|
* Returns "unknown" ONLY if all inputs are invalid.
|
|
7
7
|
*/
|
|
8
8
|
export declare function resolveValue<T = string>(...values: Array<T | string | null | undefined>): T | "unknown";
|
|
9
|
-
export
|
|
10
|
-
|
|
9
|
+
export interface LogStringOptions {
|
|
10
|
+
message: string;
|
|
11
|
+
logType?: LogType;
|
|
12
|
+
details?: any;
|
|
13
|
+
function_name?: any;
|
|
14
|
+
file_location?: any;
|
|
15
|
+
consumerLogger?: any;
|
|
16
|
+
}
|
|
17
|
+
export declare function getLogString(options: LogStringOptions): string;
|
|
18
|
+
export declare function getLogString(messageOrOptions: string | LogStringOptions, logType?: LogType, details?: any, function_name?: any, file_location?: any, consumerLogger?: any): string;
|
package/package.json
CHANGED