@hatchet-dev/typescript-sdk 1.4.1 → 1.4.2
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/package.json +1 -1
- package/v1/client/worker/context.js +13 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
package/package.json
CHANGED
|
@@ -166,6 +166,19 @@ class Context {
|
|
|
166
166
|
this.logger.warn('cannot log from context without stepRunId');
|
|
167
167
|
return;
|
|
168
168
|
}
|
|
169
|
+
const logger = this.v1.config.logger('ctx', this.v1.config.log_level);
|
|
170
|
+
if (!level || level === 'INFO') {
|
|
171
|
+
logger.info(message);
|
|
172
|
+
}
|
|
173
|
+
else if (level === 'DEBUG') {
|
|
174
|
+
logger.debug(message);
|
|
175
|
+
}
|
|
176
|
+
else if (level === 'WARN') {
|
|
177
|
+
logger.warn(message);
|
|
178
|
+
}
|
|
179
|
+
else if (level === 'ERROR') {
|
|
180
|
+
logger.error(message);
|
|
181
|
+
}
|
|
169
182
|
// FIXME: this is a hack to get around the fact that the log level is not typed
|
|
170
183
|
this.v1.event.putLog(stepRunId, message, level);
|
|
171
184
|
}
|
package/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const HATCHET_VERSION = "1.4.
|
|
1
|
+
export declare const HATCHET_VERSION = "1.4.2";
|
package/version.js
CHANGED