apps/recallassess/recallassess-api/src/api/shared/system-log/system-log-shared.module.ts
Shared System Log Module Provides the SystemLogService to all modules in the application This service is request-scoped to access request context
import { BNestPrismaModule } from "@bish-nest/core/services/database/prisma/prisma.module";
import { Global, Module, Scope } from "@nestjs/common";
import { REQUEST } from "@nestjs/core";
import { SystemLogHttp500NotificationService } from "../services/system-log-http500-notification.service";
import { SystemLogService } from "../services/system-log.service";
/**
* Shared System Log Module
* Provides the SystemLogService to all modules in the application
* This service is request-scoped to access request context
*/
@Global()
@Module({
imports: [BNestPrismaModule],
providers: [
SystemLogHttp500NotificationService,
{
provide: SystemLogService,
useClass: SystemLogService,
scope: Scope.REQUEST, // Request-scoped to access request context
},
],
exports: [SystemLogService, SystemLogHttp500NotificationService],
})
export class SystemLogSharedModule {}