standard-log 10.3.0 → 11.0.1

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.
@@ -6073,43 +6073,63 @@ exports.logLevels = {
6073
6073
  none: 0,
6074
6074
  /**
6075
6075
  * emergency: 100
6076
+ *
6077
+ * emergency -> alert
6076
6078
  */
6077
6079
  emergency: 100,
6078
6080
  /**
6079
6081
  * alert: 200
6082
+ *
6083
+ * emergency -> alert -> critical
6080
6084
  */
6081
6085
  alert: 200,
6082
6086
  /**
6083
6087
  * critical: 300
6088
+ *
6089
+ * alert -> critical -> error
6084
6090
  */
6085
6091
  critical: 300,
6086
6092
  /**
6087
6093
  * error: 400
6094
+ *
6095
+ * critical -> error -> warn
6088
6096
  */
6089
6097
  error: 400,
6090
6098
  /**
6091
6099
  * warn: 500
6100
+ *
6101
+ * error -> warn -> notice
6092
6102
  */
6093
6103
  warn: 500,
6094
6104
  /**
6095
6105
  * notice: 600
6106
+ *
6107
+ * warn -> notice -> info
6096
6108
  */
6097
6109
  notice: 600,
6098
6110
  /**
6099
6111
  * info: 700
6112
+ *
6113
+ * notice -> info -> debug
6100
6114
  */
6101
6115
  info: 700,
6102
6116
  /**
6103
6117
  * debug: 800
6118
+ *
6119
+ * info -> debug -> trace
6104
6120
  */
6105
6121
  debug: 800,
6106
6122
  /**
6107
6123
  * trace: 900
6124
+ *
6125
+ * debug -> trace -> planck
6108
6126
  */
6109
6127
  trace: 900,
6110
6128
  /**
6111
6129
  * planck: Infinity
6112
6130
  * `planck unit` is a very small unit <https://en.wikipedia.org/wiki/Planck_units>.
6131
+ *
6132
+ * trace -> planck
6113
6133
  */
6114
6134
  planck: Infinity,
6115
6135
  /**
@@ -6340,6 +6360,7 @@ exports.createMemoryLogReporter = exports.toMessageWithLevel = void 0;
6340
6360
  var type_plus_1 = __webpack_require__(/*! type-plus */ "../../node_modules/.pnpm/type-plus@4.13.1/node_modules/type-plus/cjs/index.js");
6341
6361
  var platform_js_1 = __webpack_require__(/*! ./platform.js */ "./ts/platform.browser.ts");
6342
6362
  var formatter_js_1 = __webpack_require__(/*! ./formatter.js */ "./ts/formatter.ts");
6363
+ var console_js_1 = __webpack_require__(/*! ./console.js */ "./ts/console.ts");
6343
6364
  function toMessageWithLevel(logs) {
6344
6365
  return logs.map(platform_js_1.toInspectLogEntry)
6345
6366
  .map(function (log) { return "".concat((0, formatter_js_1.formatLogLevel)(log.level), " ").concat(log.args.join(' ')); })
@@ -6374,7 +6395,14 @@ function createMemoryLogReporter(options) {
6374
6395
  return logs.map(platform_js_1.toInspectLogEntry)
6375
6396
  .map(function (log) { return "".concat(log.id, " ").concat((0, formatter_js_1.formatLogLevel)(log.level), " ").concat(log.args.join(' ')); });
6376
6397
  },
6377
- getLogMessageWithLevel: function () { return toMessageWithLevel(logs); }
6398
+ getLogMessageWithLevel: function () { return toMessageWithLevel(logs); },
6399
+ /**
6400
+ * emit the saved log to console for easy debugging
6401
+ */
6402
+ emit: function () {
6403
+ var reporter = (0, console_js_1.createConsoleLogReporter)();
6404
+ logs.forEach(function (l) { return reporter.write(l); });
6405
+ }
6378
6406
  });
6379
6407
  }
6380
6408
  exports.createMemoryLogReporter = createMemoryLogReporter;
Binary file