refactor: break monorepo into 3 standalone services (gateway, backend, frontend)
Build & Deploy / build-and-push (backend) (push) Failing after 35s
Build & Deploy / build-and-push (discord-gateway) (push) Failing after 25s
Build & Deploy / build-and-push (proxy) (push) Failing after 25s
Build & Deploy / build-and-push (backend) (push) Failing after 35s
Build & Deploy / build-and-push (discord-gateway) (push) Failing after 25s
Build & Deploy / build-and-push (proxy) (push) Failing after 25s
- Remove pnpm workspace, moon repo, and all monorepo tooling - Delete packages/shared/, embed shared code directly into each service - Copy packages/shared/src/* -> services/backend/src/shared/ and services/discord-gateway/src/shared/ - Replace all @bete/shared imports with @/shared/ path alias - Remove @bete/shared workspace dependency from both services - Update root package.json scripts from --filter to --prefix - Rewrite Dockerfiles to build each service standalone - Clean up biome.json, .gitignore, remove root drizzle.config.ts
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
import pino from "pino";
|
||||
|
||||
const rootLogger = pino({
|
||||
level: process.env.LOG_LEVEL || "info",
|
||||
transport:
|
||||
process.env.NODE_ENV === "development"
|
||||
? {
|
||||
target: "pino-pretty",
|
||||
options: {
|
||||
colorize: true,
|
||||
translateTime: "SYS:standard",
|
||||
ignore: "pid,hostname",
|
||||
},
|
||||
}
|
||||
: undefined,
|
||||
} as pino.LoggerOptions);
|
||||
|
||||
export type Logger = ReturnType<typeof createChildLogger>;
|
||||
|
||||
/**
|
||||
* Alias for backwards compatibility (discord-gateway uses this name).
|
||||
*/
|
||||
export type CustomLogger = Logger;
|
||||
|
||||
/**
|
||||
* Returns a child logger bound to the root singleton via pino's .child().
|
||||
* Preserves parent context and is efficient (no transport re-init per call).
|
||||
*/
|
||||
export function createChildLogger(context: string) {
|
||||
return rootLogger.child({ context });
|
||||
}
|
||||
Reference in New Issue
Block a user