title: How to use Morgan logger token's value in another variable or functions?
body: <p>I'm relatively new to Javascript and NodeJS.<br>
  I'm trying to use Morgan with Express.js. I have read the documentation regarding it <a href="https://github.com/expressjs/morgan#using-a-custom-format-function" rel="nofollow noreferrer">here</a>. Is there any way to reuse the return value from the predefined tokens?</p>
  
  <p>From the documentation, it is stated that you can use something like this:</p>
  
  <pre><code>let express = require('express');
  let logger = require('morgan');
  
  let app = express();
  
  app.use(logger(function (tokens, req, res) {
    return [
      tokens.method(req, res),
      tokens.url(req, res),
      tokens.status(req, res),
      tokens.res(req, res, 'content-length'), '-',
      tokens['response-time'](req, res), 'ms'
    ].join(' ')
  }));
  
  </code></pre>
  
  <p>Can we use the values of the tokens? for example, the value of response-time in another function?  </p>
  
  <pre><code>tokens['response-time'](req, res) //Use the value of this in another function
  </code></pre>
  
  <p>I wish to be able to save the log of time elapsed from the request received until the response sent back to the client into my database. Is there any solution/suggestion regarding this?</p>