Refactor logging to centralized logger

This commit is contained in:
thePR0M3TH3AN committed 2025-10-15 11:11:14 -04:00
1 parent 08d770162b
commit 37ba57aa37
67 files changed
+1130 -798

No files matched your search

+10 -1
View File
@@ -17,6 +17,15 @@
<script>
(async () => {
const fallbackChannel = {
error: () => {},
warn: () => {},
info: () => {},
log: () => {},
};
const fallbackLogger = { dev: fallbackChannel, user: fallbackChannel };
const bitvidLogger =
(typeof window !== "undefined" && window.bitvidLogger) || fallbackLogger;
try {
// Fetch the Markdown file
const response = await fetch("content/getting-started.md");
@@ -40,7 +49,7 @@
hljs.highlightBlock(block);
});
} catch (err) {
console.error("Error loading 'Getting Started' content:", err);
bitvidLogger.user.error("Error loading 'Getting Started' content:", err);
const container = document.getElementById("markdown-container");
if (container) {
container.innerHTML = `