From 90449bc745546f0f25bc93ee4b06d21b7c0210e8 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sun, 18 Feb 2024 08:01:22 -0500 Subject: 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 --- ext/js/comm/api.js | 12 ++++++------ ext/js/comm/cross-frame-api.js | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'ext/js/comm') 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>} + * @param {import('api').ApiParam<'logGenericErrorBackend', 'error'>} error + * @param {import('api').ApiParam<'logGenericErrorBackend', 'level'>} level + * @param {import('api').ApiParam<'logGenericErrorBackend', 'context'>} context + * @returns {Promise>} */ - 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 -- cgit v1.2.3