diff --git a/server/tasks/analyze.ts b/server/tasks/analyze.ts index b85fe14..1bc6331 100644 --- a/server/tasks/analyze.ts +++ b/server/tasks/analyze.ts @@ -1,11 +1,9 @@ -import consola from "consola"; import { updateGameVersions } from "~~/server/utils/processing/gameVersions/processing"; import { updateGlobalStats } from "~~/server/utils/processing/global/processing"; import { updateStatistics } from "~~/server/utils/processing/projects/processing"; import { DB } from "../utils/db/sql"; import { updateConnections } from "../utils/processing/connections/processing"; - -export const LOGGER = consola.withTag("Analyze"); +import { LOGGER } from "../utils/processing/logging"; export default defineTask({ meta: { diff --git a/server/utils/processing/connections/processing.ts b/server/utils/processing/connections/processing.ts index eb844d0..8ad65ed 100644 --- a/server/utils/processing/connections/processing.ts +++ b/server/utils/processing/connections/processing.ts @@ -1,5 +1,5 @@ -import { LOGGER } from "~~/server/tasks/analyze"; import { DB } from "../../db/sql"; +import { LOGGER } from "../logging"; import { getModpackIds, getProjectData, diff --git a/server/utils/processing/gameVersions/processing.ts b/server/utils/processing/gameVersions/processing.ts index ecd4879..0cf3bb7 100644 --- a/server/utils/processing/gameVersions/processing.ts +++ b/server/utils/processing/gameVersions/processing.ts @@ -1,4 +1,3 @@ -import { LOGGER } from "~~/server/tasks/analyze"; import { getGameVersions } from "~~/server/utils/processing/gameVersions/fetching"; import type { GameVersion, @@ -7,6 +6,7 @@ import type { SupportedVersions, } from "~~/server/utils/processing/gameVersions/types"; import type { Version } from "~~/server/utils/processing/projects/types"; +import { LOGGER } from "../logging"; export async function updateGameVersions() { LOGGER.info("updating game versions [starting]"); diff --git a/server/utils/processing/global/processing.ts b/server/utils/processing/global/processing.ts index da46b21..8b4671d 100644 --- a/server/utils/processing/global/processing.ts +++ b/server/utils/processing/global/processing.ts @@ -1,5 +1,5 @@ -import { LOGGER } from "~~/server/tasks/analyze"; import type { GlobalStats } from "~~/server/utils/processing/global/types"; +import { LOGGER } from "../logging"; export async function updateGlobalStats() { LOGGER.info("updating globalStats [starting]"); diff --git a/server/utils/processing/logging.ts b/server/utils/processing/logging.ts new file mode 100644 index 0000000..b066d8d --- /dev/null +++ b/server/utils/processing/logging.ts @@ -0,0 +1,3 @@ +import consola from "consola"; + +export const LOGGER = consola.withTag("Analyze"); diff --git a/server/utils/processing/projects/processing.ts b/server/utils/processing/projects/processing.ts index def8ea3..276073d 100644 --- a/server/utils/processing/projects/processing.ts +++ b/server/utils/processing/projects/processing.ts @@ -1,5 +1,4 @@ import { chunkArray } from "#shared/utils/array"; -import { LOGGER } from "~~/server/tasks/analyze"; import { getSupportedGameVersions } from "~~/server/utils/processing/gameVersions/processing"; import type { GameVersionData, @@ -14,6 +13,7 @@ import type { ProjectStats, Version, } from "~~/server/utils/processing/projects/types"; +import { LOGGER } from "../logging"; type StatsDataType = Map< string,