mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-06 12:52:26 +00:00
Refactor logging to centralized logger
This commit is contained in:
1 parent
08d770162b
commit
37ba57aa37
67 files changed
+1130
-798
No files matched your search
@@ -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 = `
|
||||
|
||||
Reference in new issue
Block a user