Chg: loggerをclassに変更 / Feat: loggerでの発生場所の記録
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user