@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hatchet-dev/typescript-sdk",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "description": "Background task orchestration & visibility for developers",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [
@@ -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";
1
+ export declare const HATCHET_VERSION = "1.4.2";
package/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.HATCHET_VERSION = void 0;
4
- exports.HATCHET_VERSION = '1.4.1';
4
+ exports.HATCHET_VERSION = '1.4.2';