You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Actually, I'm saving activity logs in my database and I also want to save the associated "reqId" so I can track down problems later if any arise. I need to access the log request ID outside the logger.log function. I also mentioned the scenario below:
import{Injectable,Logger}from'@nestjs/common';
@Injectable()exportclassMyService{privatereadonlylogger=newLogger(MyService.name);asyncsaveActivity(){this.logger.log("saving user activity");// this will print the log with reqId// saving user activity in the DBawaituserActivityRepo.save({ ...rest,request_id: ?? });// I want to above log reqId in request_id column while saving activity}}
The text was updated successfully, but these errors were encountered:
Actually, I'm saving activity logs in my database and I also want to save the associated "reqId" so I can track down problems later if any arise. I need to access the log request ID outside the
logger.log
function. I also mentioned the scenario below:app.module.ts
app.service.ts
The text was updated successfully, but these errors were encountered: