Created
July 20, 2018 08:41
-
-
Save jcperez/c586b2dd873309b302c86fbc04562fcb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function logger(message) { | |
console.log(`${session.get('request-id')} - ${message}`); | |
} | |
app.get('/', (req, res) => { | |
logger(`Request to ${req.path}`); | |
res.send(`Request completed - ${session.get('request-id')}`); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment