From 3dca115eb62649d92d5cf5feced375ddb617b745 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Mon, 30 Oct 2023 19:49:17 -0400 Subject: [PATCH] Add more dev console tracing to asset updater --- src/js/assets.js | 6 ++++++ src/js/background.js | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/js/assets.js b/src/js/assets.js index 35c7ed89b..06c3b8a40 100644 --- a/src/js/assets.js +++ b/src/js/assets.js @@ -1260,6 +1260,7 @@ async function diffUpdater() { resourceTime: metadata.lastModified || 0, }); assetCacheSetDetails(data.name, metadata); + updaterUpdated.push(data.name); } else if ( data.error ) { ubolog(`Diff updater: failed to diff-update ${data.name}, reason: ${data.error}`); } @@ -1280,6 +1281,7 @@ async function diffUpdater() { } function updateFirst() { + ubolog('Updater: cycle start'); updaterStatus = 'updating'; updaterFetched.clear(); updaterUpdated.length = 0; @@ -1379,6 +1381,10 @@ function updateDone() { updaterUpdated.length = 0; updaterStatus = undefined; updaterAssetDelay = updaterAssetDelayDefault; + ubolog('Updater: cycle end'); + if ( assetKeys.length ) { + ubolog(`Updater: ${assetKeys.join()} were updated`); + } fireNotification('after-assets-updated', { assetKeys }); } diff --git a/src/js/background.js b/src/js/background.js index 35bbbe758..2d1260ad8 100644 --- a/src/js/background.js +++ b/src/js/background.js @@ -27,6 +27,7 @@ import logger from './logger.js'; import { FilteringContext } from './filtering-context.js'; +import { ubologSet } from './console.js'; import { domainFromHostname, @@ -92,6 +93,7 @@ const hiddenSettingsDefault = { if ( vAPI.webextFlavor.soup.has('devbuild') ) { hiddenSettingsDefault.consoleLogLevel = 'info'; hiddenSettingsDefault.trustedListPrefixes += ' user-'; + ubologSet(true); } const userSettingsDefault = {