change console.trace to console.debug

This commit is contained in:
Aran-Fey
2024-06-02 09:06:49 +02:00
parent 77c7a53109
commit 2515a60422
8 changed files with 8 additions and 9 deletions

View File

@@ -121,7 +121,7 @@ async function main(): Promise<void> {
// ScrollTarget, but not both.
// FIXME: Find a way to tell whether only the url fragment changed
console.trace(`URL changed to ${window.location.href}`);
console.debug(`URL changed to ${window.location.href}`);
callRemoteMethodDiscardResponse('onUrlChange', {
newUrl: window.location.href.toString(),
});

View File

@@ -473,7 +473,7 @@ export function updateComponentStates(
Math.abs(deltaState._size_![1] - component.state._size_[1]) > 1e-6;
if (width_changed || height_changed) {
console.trace(
console.debug(
`Triggering re-layout because component #${id} changed size: ${component.state._size_} -> ${deltaState._size_}`
);
component.makeLayoutDirty();

View File

@@ -37,7 +37,7 @@ function withPlotly(callback: () => void): void {
}
// Otherwise fetch plotly and call the callback when it's done
console.trace('Fetching plotly.js');
console.debug('Fetching plotly.js');
let script = document.createElement('script');
script.src = '/rio/asset/special/plotly.min.js';

View File

@@ -259,7 +259,7 @@ export async function applyIcon(
// No, load it from the server
if (promise === undefined) {
console.trace(`Fetching icon ${iconName} from server`);
console.debug(`Fetching icon ${iconName} from server`);
promise = fetch(`/rio/icon/${iconName}`).then((response) =>
response.text()

View File

@@ -22,7 +22,6 @@ export function eventRateLimiter(
// If a timeout is already set, do nothing
if (timeout) {
console.trace('Eating');
return;
}

View File

@@ -207,7 +207,7 @@ function onMessage(event: MessageEvent<string>) {
// Print a copy of the message because some messages are modified in-place
// when they're processed
console.trace('Received message: ', JSON.parse(event.data));
console.debug('Received message: ', JSON.parse(event.data));
// Push it into the queue, to be processed as soon as the previous message
// has been processed
@@ -267,7 +267,7 @@ export function sendMessageOverWebsocket(message: object) {
return;
}
console.trace('Sending message: ', message);
console.debug('Sending message: ', message);
websocket.send(JSON.stringify(message));
}

View File

@@ -44,7 +44,7 @@ export async function registerFont(
}
if (numFailures === 0) {
console.trace(
console.debug(
`Successfully registered all ${numSuccesses} variations of font ${name}`
);
} else if (numSuccesses === 0) {

View File

@@ -1063,7 +1063,7 @@ Sitemap: {request_url.with_path("/rio/sitemap")}
js_page_url = json.dumps(str(active_page_url_absolute))
await sess._evaluate_javascript(
f"""
console.trace("Updating browser URL to match the one modified by guards:", {js_page_url});
console.debug("Updating browser URL to match the one modified by guards:", {js_page_url});
window.history.replaceState(null, "", {js_page_url});
"""
)