UNPKG

@villedemontreal/correlation-id

Version:

Express middleware to set a correlation in Express. The correlation id will be consistent across async calls within the handling of a request.

26 lines 690 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.configs = exports.Configs = void 0; /** * Http Client Config */ class Configs { /** * Sets the Logger creator. */ setLoggerCreator(loggerCreator) { this.loggerCreatorVar = loggerCreator; } /** * The Logger creator */ get loggerCreator() { if (!this.loggerCreatorVar) { throw new Error(`The Logger Creator HAS to be set as a configuration! Please call the init(...) fonction first.`); } return this.loggerCreatorVar; } } exports.Configs = Configs; exports.configs = new Configs(); //# sourceMappingURL=configs.js.map