import { Injectable } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { LoggerClient } from '../../../clients/logger.client'; @Injectable() export class LogService { private logClient: LoggerClient; constructor(private configService: ConfigService) { const kafkaClientId = this.configService.get('KAFKA__CLIENT_ID'); const kafkaBrokers = this.configService .get('KAFKA__BROKERS') .split(','); const kafkaLogTopic = this.configService.get('KAFKA__TOPIC_LOG'); this.logClient = new LoggerClient( kafkaBrokers, kafkaClientId, kafkaLogTopic, ); } }