Chg: loggerをclassに変更 / Feat: loggerでの発生場所の記録

This commit is contained in:
2026-03-19 20:28:45 +09:00
parent 9dc67d3016
commit 01e917c214
13 changed files with 67 additions and 27 deletions
+3 -1
View File
@@ -2,7 +2,7 @@ import type { FastifyPluginAsync } from "fastify";
import fp from "fastify-plugin";
import { MikroORM } from "@mikro-orm/postgresql";
import config from "@/mikro-orm.config";
import logger from "@/lib/logger";
import Logger from "@/lib/logger";
declare module "fastify" {
interface FastifyInstance {
@@ -10,6 +10,8 @@ declare module "fastify" {
}
}
const logger = new Logger("Lib | db.ts");
const Database: FastifyPluginAsync = async (fastify) => {
const orm = await MikroORM.init(config);