Skip to content

Commit 76cfec3

Browse files
committed
fix structured logging, not in frontend
1 parent 3a2db87 commit 76cfec3

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

eslint.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export default defineConfig(
3131
},
3232
{
3333
// Allow console in CLI tool and logger implementation
34-
files: ["cli.ts", "src/lib/server/logger.ts"],
34+
files: ["cli.ts", "src/lib/server/logger.ts", "**/*.svelte"],
3535
rules: {
3636
"no-console": "off",
3737
},

src/routes/servers/[server]/databases/[database]/collections/[collection]/documents/+page.svelte

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import { notificationStore } from "$lib/stores/notifications.svelte";
1515
import type { MongoDocument, SearchParams } from "$lib/types";
1616
import { formatNumber } from "$lib/utils/filters";
17-
import { logger } from "$lib/utils/logger";
1817
import { SvelteURLSearchParams } from "svelte/reactivity";
1918
import type { PageData } from "./$types";
2019
@@ -104,7 +103,7 @@
104103
modifiedItems = items;
105104
}
106105
} catch (error) {
107-
logger.log(error);
106+
console.error(error);
108107
notificationStore.notifyError(error, "Failed to update document");
109108
}
110109
}
@@ -196,7 +195,7 @@
196195
editMode = false;
197196
}
198197
} catch (error) {
199-
logger.error(error);
198+
console.error(error);
200199
notificationStore.notifyError(error, "Failed to update documents");
201200
} finally {
202201
isUpdating = false;

src/routes/servers/[server]/databases/[database]/collections/[collection]/mappings/+page.svelte

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import Panel from "$lib/components/Panel.svelte";
55
import { notificationStore } from "$lib/stores/notifications.svelte";
66
import type { MappingTarget } from "$lib/types";
7-
import { logger } from "$lib/utils/logger";
87
import type { PageData } from "./$types";
98
let { data }: { data: PageData } = $props();
109
// Convert mappings to an editable array format
@@ -154,7 +153,7 @@ Please analyze the codebase and database, then generate the appropriate mappings
154153
});
155154
notificationStore.notifySuccess("Mappings saved successfully");
156155
} catch (error) {
157-
logger.error("Error saving mappings:", error);
156+
console.error("Error saving mappings:", error);
158157
notificationStore.notifyError(error, "Failed to save mappings");
159158
}
160159
}

0 commit comments

Comments
 (0)