diff --git a/apps/app/src/actions/safe-action.ts b/apps/app/src/actions/safe-action.ts index 1ff57470..3a32d4b0 100644 --- a/apps/app/src/actions/safe-action.ts +++ b/apps/app/src/actions/safe-action.ts @@ -47,9 +47,9 @@ export const authActionClient = actionClientWithMeta const result = await next({ ctx: {} }); if (process.env.NODE_ENV === "development") { - logger("Input ->", clientInput); - logger("Result ->", result.data); - logger("Metadata ->", metadata); + logger.info(`Input -> ${JSON.stringify(clientInput)}`); + logger.info(`Result -> ${JSON.stringify(result.data)}`); + logger.info(`Metadata -> ${JSON.stringify(metadata)}`); return result; } diff --git a/packages/logger/src/index.ts b/packages/logger/src/index.ts index c6bbbe4f..ed264202 100644 --- a/packages/logger/src/index.ts +++ b/packages/logger/src/index.ts @@ -1 +1,3 @@ -export const logger = require("pino")(); +import pino from "pino"; + +export const logger = pino();