Skip to content

Commit

Permalink
more page load logs, use 1 decimal point.
Browse files Browse the repository at this point in the history
  • Loading branch information
jifalops committed Nov 30, 2024
1 parent 2fda724 commit b51d47a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const init_start = performance.now();

export const log = new Log(IS_PRODUCTION_BUILD ? Log.INFO : Log.TRACE);

log.debug(init_start, 'Initializing...');
log.debug(init_start.toFixed(1), 'Initializing...');
log.debug('Config:', {
API_URL,
BUILD_MODE,
Expand Down Expand Up @@ -66,4 +66,4 @@ try {
}
export const app = _app;

log.info(performance.now(), base ? `Initialized at ${base}.` : 'Initialized.');
log.info(performance.now().toFixed(1), base ? `Initialized at ${base}.` : 'Initialized.');
3 changes: 2 additions & 1 deletion src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
import { onMount } from 'svelte';
import '../app.css';
log.info(performance.now().toFixed(1), 'Loading', window.location.pathname);
onMount(() => {
log.info(performance.now(), 'Page loaded.');
log.info(performance.now().toFixed(1), 'Loaded', window.location.pathname);
app.telemetry.pageView(window.location.pathname);
});
</script>
Expand Down

0 comments on commit b51d47a

Please sign in to comment.