summaryrefslogtreecommitdiff
path: root/ext/js/core.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js/core.js')
-rw-r--r--ext/js/core.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/ext/js/core.js b/ext/js/core.js
index 9995ee5b..63c2f527 100644
--- a/ext/js/core.js
+++ b/ext/js/core.js
@@ -734,6 +734,21 @@ export class Logger extends EventDispatcher {
error(error, context = null) {
this.log(error, 'error', context);
}
+
+ /**
+ * @param {import('log').LogLevel} errorLevel
+ * @returns {import('log').LogErrorLevelValue}
+ */
+ getLogErrorLevelValue(errorLevel) {
+ switch (errorLevel) {
+ case 'log':
+ case 'info':
+ case 'debug':
+ return 0;
+ case 'warn': return 1;
+ case 'error': return 2;
+ }
+ }
}
/**