@typespec/ts-http-runtime 1.0.0-alpha.20240101.1 → 1.0.0-alpha.20240108.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/dist/index.js CHANGED
@@ -393,7 +393,6 @@ function extend(namespace) {
393
393
  newDebugger.log = this.log;
394
394
  return newDebugger;
395
395
  }
396
- var debug = debugObj;
397
396
 
398
397
  // Copyright (c) Microsoft Corporation.
399
398
  // Licensed under the MIT license.
@@ -406,9 +405,9 @@ let typeSpecRuntimeLogLevel;
406
405
  * By default, logs are sent to stderr.
407
406
  * Override the `log` method to redirect logs to another location.
408
407
  */
409
- const TypeSpecRuntimeLogger = debug("typeSpecRuntime");
408
+ const TypeSpecRuntimeLogger = debugObj("typeSpecRuntime");
410
409
  TypeSpecRuntimeLogger.log = (...args) => {
411
- debug.log(...args);
410
+ debugObj.log(...args);
412
411
  };
413
412
  const TYPESPEC_RUNTIME_LOG_LEVELS = ["verbose", "info", "warning", "error"];
414
413
  if (logLevelFromEnv) {
@@ -440,7 +439,7 @@ function setLogLevel(level) {
440
439
  enabledNamespaces.push(logger.namespace);
441
440
  }
442
441
  }
443
- debug.enable(enabledNamespaces.join(","));
442
+ debugObj.enable(enabledNamespaces.join(","));
444
443
  }
445
444
  const levelMap = {
446
445
  verbose: 400,
@@ -474,8 +473,8 @@ function createLogger(parent, level) {
474
473
  });
475
474
  patchLogMethod(parent, logger);
476
475
  if (shouldEnable(logger)) {
477
- const enabledNamespaces = debug.disable();
478
- debug.enable(enabledNamespaces + "," + logger.namespace);
476
+ const enabledNamespaces = debugObj.disable();
477
+ debugObj.enable(enabledNamespaces + "," + logger.namespace);
479
478
  }
480
479
  registeredLoggers.add(logger);
481
480
  return logger;