Log timing info for document load

This commit is contained in:
2025-09-24 08:55:22 -07:00
parent cfae45aca9
commit 4110eaf45a
4 changed files with 30 additions and 1 deletions
+13
View File
@@ -0,0 +1,13 @@
import { createSignal, For } from 'solid-js';
const [getDebugLogs, setDebugLogs] = createSignal<string[]>([]);
export function debugLog(message: string, ...args: any[]) {
const components = [message, ...args.map((x) => JSON.stringify(x))];
const line = components.join(' ');
setDebugLogs([...getDebugLogs(), line]);
}
export default function DebugView() {
return <For each={getDebugLogs()}>{(logLine) => <p>{logLine}</p>}</For>;
}