Revert "Refactor logging to centralized logger"

This commit is contained in:
thePR0M3TH3AN authored and GitHub committed 2025-10-15 11:14:10 -04:00
1 parent 2e7038e0e6
commit d705cf176b
67 files changed
+798 -1130

No files matched your search

+6 -7
View File
@@ -1,4 +1,3 @@
import { userLogger } from "./utils/logger.js";
const DB_NAME = "bitvidSettings";
const DB_VERSION = 1;
const STORE_NAME = "kv";
@@ -105,7 +104,7 @@ export async function loadR2Settings() {
});
}
} catch (err) {
userLogger.warn("Failed to open IndexedDB for settings, falling back:", err);
console.warn("Failed to open IndexedDB for settings, falling back:", err);
}
try {
@@ -116,7 +115,7 @@ export async function loadR2Settings() {
}
}
} catch (err) {
userLogger.warn("Failed to read fallback settings:", err);
console.warn("Failed to read fallback settings:", err);
}
return normalizeSettings(null);
@@ -129,7 +128,7 @@ export async function saveR2Settings(settings) {
try {
db = await openSettingsDb();
} catch (err) {
userLogger.warn("Unable to open IndexedDB, continuing with fallback:", err);
console.warn("Unable to open IndexedDB, continuing with fallback:", err);
}
if (db) {
@@ -166,7 +165,7 @@ export async function clearR2Settings() {
cleared = true;
}
} catch (err) {
userLogger.warn("Failed to clear IndexedDB settings:", err);
console.warn("Failed to clear IndexedDB settings:", err);
}
try {
@@ -175,7 +174,7 @@ export async function clearR2Settings() {
cleared = true;
}
} catch (err) {
userLogger.warn("Failed to clear fallback settings:", err);
console.warn("Failed to clear fallback settings:", err);
}
return cleared;
@@ -256,4 +255,4 @@ export function buildPublicUrl(baseUrl, key) {
return `${sanitizedBase}/${encodedKey}`;
}
export { sanitizeBaseDomain };
export { sanitizeBaseDomain };