UNPKG

nestjs-context-winston

Version:

Contextual Logger for nestjs apps using AsyncLocalStorage and winston

18 lines 634 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ContextLoggerContextGuard = void 0; const start_log_context_if_absent_1 = require("./start-log-context-if-absent"); class ContextLoggerContextGuard { logger; options; constructor(logger, options) { this.logger = logger; this.options = options; } canActivate(context) { (0, start_log_context_if_absent_1.startLogContextIfAbsent)(context, this.options, this.logger); return true; } } exports.ContextLoggerContextGuard = ContextLoggerContextGuard; //# sourceMappingURL=logger-context-guard.js.map