refactor(logs): move to core package (#4586)

This commit is contained in:
Meier Lukas authored and GitHub committed 2025-12-16 23:37:44 +01:00
1 parent d86af072bf
commit d348abfe4a
145 files changed
+971 -708

No files matched your search

@@ -1,9 +1,9 @@
import type { z } from "zod/v4";
import { Stopwatch } from "@homarr/common";
import { createLogger } from "@homarr/core/infrastructure/logs";
import { handleTransactionsAsync } from "@homarr/db";
import type { Database } from "@homarr/db";
import { logger } from "@homarr/log";
import { analyseOldmarrImportAsync } from "../analyse/analyse-oldmarr-import";
import { prepareMultipleImports } from "../prepare/prepare-multiple";
@@ -13,6 +13,8 @@ import { createUserInsertCollection } from "./collections/user-collection";
import type { importInitialOldmarrInputSchema } from "./input";
import { ensureValidTokenOrThrow } from "./validate-token";
const logger = createLogger({ module: "importInitialOldmarr" });
export const importInitialOldmarrAsync = async (
db: Database,
input: z.infer<typeof importInitialOldmarrInputSchema>,
@@ -52,5 +54,5 @@ export const importInitialOldmarrAsync = async (
},
});
logger.info(`Import successful (in ${stopwatch.getElapsedInHumanWords()})`);
logger.info("Import successful", { duration: stopwatch.getElapsedInHumanWords() });
};