import { Application } from 'express' ; import { IOCContainer } from './ioc_config' ; import SERVICE_IDENTIFIER from '../constants/identifiers' ; import ILogger from '../interfaces/ilogger' ; const container = IOCContainer . getInstance ( ) . getContainer ( ) ; const LOG = container . get < ILogger > ( SERVICE_IDENTIFIER . LOGGER ) ; const UUID = 'UUID' ; param app export const configLogging = ( app ) => { app . use ( ( req , res , next ) => { if ( req . cookies [ UUID ] !== undefined ) { LOG . setUUID ( req . cookies [ UUID ] ) ; } else { LOG . setUUID ( undefined ) ; } next ( ) ; } ) ; } ; export default LOG ;