diff --git a/app.ts b/app.ts index 25129027..a3fe1f03 100644 --- a/app.ts +++ b/app.ts @@ -1,6 +1,5 @@ import { join } from "node:path"; import { handleZodError } from "@/api"; -import { configureLoggers } from "@/loggers"; import { sentry } from "@/sentry"; import { cors } from "@hono/hono/cors"; import { createMiddleware } from "@hono/hono/factory"; @@ -24,7 +23,6 @@ import { routes } from "./routes"; import type { ApiRouteExports, HonoEnv } from "./types/api"; export const appFactory = async () => { - await configureLoggers(); const serverLogger = getLogger("server"); const app = new OpenAPIHono({ diff --git a/bun.lockb b/bun.lockb index 82cca464..7d8a3ea7 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/index.ts b/index.ts index 11f887e5..de6892ec 100644 --- a/index.ts +++ b/index.ts @@ -1,9 +1,12 @@ import cluster from "node:cluster"; +import { configureLoggers } from "@/loggers"; import { sentry } from "@/sentry"; import { createServer } from "@/server"; import { appFactory } from "~/app"; import { config } from "~/packages/config-manager/index"; +await configureLoggers(); + if (cluster.isPrimary) { for (let i = 0; i < Number(process.env.NUM_CPUS ?? 1); i++) { cluster.fork();