1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-10-06 09:37:12 +02:00

Add more dev console tracing to asset updater

This commit is contained in:
Raymond Hill 2023-10-30 19:49:17 -04:00
parent 206b9c8efb
commit 3dca115eb6
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
2 changed files with 8 additions and 0 deletions

View File

@ -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 });
}

View File

@ -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 = {