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.

15 lines (13 loc) 376 B
import { init } from '../config/init'; import { getTestingLoggerCreator } from '../utils/logger'; /** * Call this when your need to set * *Testing* configurations to the current * library, without the need for a calling code * to do so. * * A test Correlation Id will be used! */ export function setTestingConfigurations(): void { init(getTestingLoggerCreator()); }