docs: function logRequest(req, res) {
  		var responseTime = Math.round(req.duration),
  			shouldLogRequest = requestLogger && req && req.url && req.url !== '/arrowPing.json',
  			shouldADILog = options && options.adiLogging && adiLogger && req && req.url && isWhitelisted(req.url),
  			time = new Date().getTime(),
  			uri = (req.route && req.route.path) || req.path || (req.url && req.url.split('?')[0]),
  			localPort = getPort(req);
  
  		if (shouldLogRequest && req.log && req.logname && (req.logmetadata === undefined || req.logmetadata)) {
  			requestLogger.info({
  				req_id: req.requestId,
  				req: req,
  				res: res,
  				route: req.route,
  				name: req._logname,
  				logname: req.logname,
  				response_time: responseTime
  			});
  
  			const result = {
  				url: req.url,
  				req_headers: req.headers,
  				status: res.status,
  				req_id: req.requestId,
  				name: req._logname,
  				logname: req.logname,
  				response_time: responseTime
  			};
  			fs.writeFile(req.logname + '.metadata', JSON.stringify(result));
  		} else if (shouldLogRequest) {
  			requestLogger.info({
  				req_id: req.requestId,
  				response_time: responseTime,
  				route: req.route,
  				req: req,
  				res: res
  			});
  		}
  
  		if (shouldADILog) {
  			adiLogger.info({
  				type: 'transaction',
  				time: time,
  				path: uri,
  				protocol: req.protocol,
  				protocolSrc: localPort,
  				duration: responseTime,
  				status: getStatus(res),
  				serviceContexts: [
  					{
  						service: '',
  						monitor: '',
  						client: null,
  						org: null,
  						app: options.name,
  						method: '',
  						status: '',
  						duration: ''
  					}
  				],
  				customMsgAtts: {},
  				correlationId: getCorrelationId(req),
  				legs: [
  					{
  						uri: uri,
  						status: res.statusCode,
  						statusText: '',
  						method: req.method,
  						vhost: null,
  						wafStatus: 0,
  						bytesSent: parseInt(res.get('Content-Length'), 10) || null,
  						bytesReceived: parseInt(req.get('Content-Length'), 10) || null,
  						remoteName: '',
  						remoteAddr: '',
  						localAddr: '',
  						remotePort: '',
  						localPort: '',
  						sslsubject: null,
  						leg: 0,
  						timestamp: time,
  						duration: responseTime,
  						serviceName: uri,
  						subject: null,
  						operation: req.method + ' - ' + uri,
  						type: req.protocol,
  						finalStatus: ''
  					}
  				]
  			});
  		}
  		if (req.cleanStream) {
  			req.cleanStream();
  			req.cleanStream = null;
  		}
  	}