From 87e8e398d2fb9f78ade399438730a508c99c18e6 Mon Sep 17 00:00:00 2001
From: Shinwoo PARK <shinwoo.park@psw.kr>
Date: Thu, 27 Mar 2025 03:00:26 +0900
Subject: [PATCH] feat(nestlogged-fastify): upgrade class verbose log with
 global logger

---
 packages/nestlogged-fastify/src/logged/class.ts | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/packages/nestlogged-fastify/src/logged/class.ts b/packages/nestlogged-fastify/src/logged/class.ts
index b7e24cd..816ec41 100644
--- a/packages/nestlogged-fastify/src/logged/class.ts
+++ b/packages/nestlogged-fastify/src/logged/class.ts
@@ -6,6 +6,7 @@ import {
 } from '@nestjs/common';
 import { RevRequestMethod } from 'nestlogged/lib/logged/utils';
 import { LoggedRoute, LoggedFunction } from './methods';
+import { logger } from 'nestlogged/lib/internals/utils';
 
 export function LoggedInjectable(
   options?: ScopeOptions & { verbose?: boolean },
@@ -19,7 +20,7 @@ export function LoggedInjectable(
         typeof target.prototype[method] === 'function'
       ) {
         if (options && options.verbose)
-          console.log(`LoggedFunction applied to ${method}`);
+          logger.log(`LoggedFunction applied to ${target.name}.${method}`);
         LoggedFunction()(target.prototype, method, {
           value: target.prototype[method],
         });
@@ -58,8 +59,8 @@ export function LoggedController(param?: any): (target: any) => void {
             'method',
             target.prototype[method],
           );
-          console.log(
-            `LoggedRoute applied to ${method} (${RevRequestMethod[httpMethod]} ${path})`,
+          logger.log(
+            `LoggedRoute applied to ${target.name}.${method} (${RevRequestMethod[httpMethod]} ${path})`,
           );
         }
         LoggedRoute()(target.prototype, method, {