modality-kit 0.9.4 → 0.9.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 +17 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -147,28 +147,35 @@ class ModalityLogger {
|
|
|
147
147
|
case "debug":
|
|
148
148
|
console.debug(payload);
|
|
149
149
|
break;
|
|
150
|
-
case "info":
|
|
151
|
-
|
|
152
|
-
console.
|
|
150
|
+
case "info": {
|
|
151
|
+
const { message, ...restPayload } = payload;
|
|
152
|
+
console.info(message);
|
|
153
|
+
console.dir(restPayload, {
|
|
153
154
|
depth: null,
|
|
154
155
|
colors: true,
|
|
155
156
|
maxArrayLength: null
|
|
156
157
|
});
|
|
157
158
|
break;
|
|
158
|
-
|
|
159
|
+
}
|
|
160
|
+
case "warn": {
|
|
161
|
+
const { message, ...restPayload } = payload;
|
|
159
162
|
console.warn(payload);
|
|
160
|
-
console.
|
|
161
|
-
|
|
163
|
+
console.dir(restPayload, {
|
|
164
|
+
depth: null,
|
|
165
|
+
colors: true,
|
|
166
|
+
maxArrayLength: null
|
|
167
|
+
});
|
|
162
168
|
break;
|
|
163
|
-
|
|
169
|
+
}
|
|
170
|
+
case "error": {
|
|
164
171
|
const error = payload.error;
|
|
165
172
|
if (error instanceof Error || error.stack) {
|
|
166
173
|
delete payload.error;
|
|
167
174
|
const { message, stack, ...restError } = error;
|
|
168
175
|
if (stack) {
|
|
169
176
|
if (Object.keys(restError).length) {
|
|
170
|
-
console.error(restError
|
|
171
|
-
|
|
177
|
+
console.error(restError);
|
|
178
|
+
console.log(stack);
|
|
172
179
|
} else {
|
|
173
180
|
console.error(stack);
|
|
174
181
|
}
|
|
@@ -182,6 +189,7 @@ class ModalityLogger {
|
|
|
182
189
|
console.error(payload);
|
|
183
190
|
}
|
|
184
191
|
break;
|
|
192
|
+
}
|
|
185
193
|
case "success":
|
|
186
194
|
console.log(payload);
|
|
187
195
|
break;
|
package/package.json
CHANGED