i'm trying to use my custom logger service inside other services, but i have noticed that when i'm provide logger service to other service didn't call any lifecycle hooks anymore
there is code of my logger service
@Injectable({ scope: Scope.REQUEST })
export class LoggerService {
constructor(
@Inject(REQUEST) private readonly payload: RequestContextHost<RequestPayloadWithCorrelationId, TcpContext>
) {}
.... // other methods
}
I need this class for get unique request id and log it, but i use this service in another which implements OnModuleInit method, so when i provide logger to this service, it just don't call onModuleInit method
Maybe getting request id for logger is wrong?