File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 5
5
const _ = require ( "lodash" ) ;
6
6
const config = require ( "config" ) ;
7
7
const HttpStatus = require ( "http-status-codes" ) ;
8
+ const uuid = require ( "uuid/v4" ) ;
8
9
const helper = require ( "./src/common/helper" ) ;
9
10
const errors = require ( "./src/common/errors" ) ;
11
+ const logger = require ( "./src/common/logger" ) ;
10
12
const routes = require ( "./src/routes" ) ;
11
13
const authenticator = require ( "tc-core-library-js" ) . middleware . jwtAuthenticator ;
12
14
@@ -26,7 +28,9 @@ module.exports = (app) => {
26
28
27
29
const actions = [ ] ;
28
30
actions . push ( ( req , res , next ) => {
29
- req . signature = `${ def . controller } #${ def . method } ` ;
31
+ req . _id = uuid ( ) ;
32
+ req . signature = `${ req . _id } -${ def . controller } #${ def . method } ` ;
33
+ logger . info ( `Started request handling, ${ req . signature } ` ) ;
30
34
next ( ) ;
31
35
} ) ;
32
36
You can’t perform that action at this time.
0 commit comments