modality-kit 0.0.4 → 0.0.5
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/index.js +3 -3
- package/dist/types/util_logger.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -157,10 +157,10 @@ class ModalityLogger {
|
|
|
157
157
|
}
|
|
158
158
|
error(message, error) {
|
|
159
159
|
const data = { message };
|
|
160
|
-
if (error) {
|
|
160
|
+
if (error instanceof Error) {
|
|
161
161
|
data.error = {
|
|
162
|
-
message: error
|
|
163
|
-
stack: error
|
|
162
|
+
message: error?.message,
|
|
163
|
+
stack: error?.stack
|
|
164
164
|
};
|
|
165
165
|
}
|
|
166
166
|
this.log("error", data);
|
|
@@ -21,7 +21,7 @@ export declare class ModalityLogger {
|
|
|
21
21
|
debug(message: string, error?: Error): void;
|
|
22
22
|
info(message: string, data?: any): void;
|
|
23
23
|
warn(message: string, resolution: string): void;
|
|
24
|
-
error(message: string, error?: Error): void;
|
|
24
|
+
error(message: string, error?: Error | unknown): void;
|
|
25
25
|
success(message: string, data?: any): void;
|
|
26
26
|
}
|
|
27
27
|
export declare const loggerInstance: typeof ModalityLogger.getInstance;
|
package/package.json
CHANGED