Clean-up console logs

This commit is contained in:
Cohee
2024-07-06 15:29:47 +03:00
parent bd4f3e733f
commit c55ad419dd
5 changed files with 18 additions and 13 deletions

View File

@ -14,6 +14,7 @@ import { SettingsUi } from './src/ui/SettingsUi.js';
const _VERBOSE = true;
export const debug = (...msg) => _VERBOSE ? console.debug('[QR2]', ...msg) : null;
export const log = (...msg) => _VERBOSE ? console.log('[QR2]', ...msg) : null;
export const warn = (...msg) => _VERBOSE ? console.warn('[QR2]', ...msg) : null;
/**
@ -206,18 +207,18 @@ const init = async () => {
window['quickReplyApi'] = quickReplyApi;
};
const finalizeInit = async () => {
log('executing startup');
debug('executing startup');
await autoExec.handleStartup();
log('/executing startup');
debug('/executing startup');
log(`executing queue (${executeQueue.length} items)`);
debug(`executing queue (${executeQueue.length} items)`);
while (executeQueue.length > 0) {
const func = executeQueue.shift();
await func();
}
log('/executing queue');
debug('/executing queue');
isReady = true;
log('READY');
debug('READY');
};
await init();