import { Module } from '@nestjs/common';
import { ConfigModule } from '@nestjs/config';

import loggingConfiguration, { appConfiguration } from './configuration';
import { LoggingController } from './logging.controller';
import { LoggingContextInterceptor } from './logging.interceptor';
import { LoggingService } from './logging.service';

@Module({
  imports: [
    ConfigModule.forFeature(appConfiguration),
    ConfigModule.forFeature(loggingConfiguration),
  ],
  controllers: [LoggingController],
  providers: [LoggingService, LoggingContextInterceptor],
  exports: [LoggingService, LoggingContextInterceptor],
})
export class LoggingModule {}
