summaryrefslogtreecommitdiff
path: root/ext/js/comm
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2024-02-18 08:01:22 -0500
committerGitHub <noreply@github.com>2024-02-18 13:01:22 +0000
commit90449bc745546f0f25bc93ee4b06d21b7c0210e8 (patch)
tree728153aaa4588a7340c3f3a45008989c0f5521b3 /ext/js/comm
parentc2e3f60e51529f05284fea5f5bc1afcd1674f5ca (diff)
Log update (#701)
* Don't export Logger * Rename logger.js to log.js * Move helper function * Update extension name configuration * Simplify docs * Move issue URL to a field * Simplify context * Remove optional params that are never used * Configure backend * Update eslint * Simplify * Rename function * Simplify _api reference * Simplify docs * Remove unused log levels (except 'log') * Add log function * Rename for more clear intent * Use log.log
Diffstat (limited to 'ext/js/comm')
-rw-r--r--ext/js/comm/api.js12
-rw-r--r--ext/js/comm/cross-frame-api.js2
2 files changed, 7 insertions, 7 deletions
diff --git a/ext/js/comm/api.js b/ext/js/comm/api.js
index 40b8e252..f07702da 100644
--- a/ext/js/comm/api.js
+++ b/ext/js/comm/api.js
@@ -253,13 +253,13 @@ export class API {
}
/**
- * @param {import('api').ApiParam<'log', 'error'>} error
- * @param {import('api').ApiParam<'log', 'level'>} level
- * @param {import('api').ApiParam<'log', 'context'>} context
- * @returns {Promise<import('api').ApiReturn<'log'>>}
+ * @param {import('api').ApiParam<'logGenericErrorBackend', 'error'>} error
+ * @param {import('api').ApiParam<'logGenericErrorBackend', 'level'>} level
+ * @param {import('api').ApiParam<'logGenericErrorBackend', 'context'>} context
+ * @returns {Promise<import('api').ApiReturn<'logGenericErrorBackend'>>}
*/
- log(error, level, context) {
- return this._invoke('log', {error, level, context});
+ logGenericErrorBackend(error, level, context) {
+ return this._invoke('logGenericErrorBackend', {error, level, context});
}
/**
diff --git a/ext/js/comm/cross-frame-api.js b/ext/js/comm/cross-frame-api.js
index 33a91c89..45ea268f 100644
--- a/ext/js/comm/cross-frame-api.js
+++ b/ext/js/comm/cross-frame-api.js
@@ -21,7 +21,7 @@ import {EventDispatcher} from '../core/event-dispatcher.js';
import {EventListenerCollection} from '../core/event-listener-collection.js';
import {ExtensionError} from '../core/extension-error.js';
import {parseJson} from '../core/json.js';
-import {log} from '../core/logger.js';
+import {log} from '../core/log.js';
/**
* @augments EventDispatcher<import('cross-frame-api').CrossFrameAPIPortEvents>