fix: log data type
This commit is contained in:
parent
21d70dd3f5
commit
a6c1df903c
1 changed files with 2 additions and 2 deletions
|
|
@ -31,7 +31,7 @@ async function logMiddleware(req: Request, res: Response, next: NextFunction) {
|
||||||
return originalJson.call(this, v);
|
return originalJson.call(this, v);
|
||||||
};
|
};
|
||||||
|
|
||||||
const timestamp = new Date().toString();
|
const timestamp = new Date().toISOString();
|
||||||
const start = performance.now();
|
const start = performance.now();
|
||||||
|
|
||||||
req.app.locals.logData = {};
|
req.app.locals.logData = {};
|
||||||
|
|
@ -49,7 +49,7 @@ async function logMiddleware(req: Request, res: Response, next: NextFunction) {
|
||||||
logType: res.statusCode >= 500 ? "error" : res.statusCode >= 400 ? "warning" : "info",
|
logType: res.statusCode >= 500 ? "error" : res.statusCode >= 400 ? "warning" : "info",
|
||||||
systemName: "BMA_EHR_DEVELOPMENT",
|
systemName: "BMA_EHR_DEVELOPMENT",
|
||||||
startTimeStamp: timestamp,
|
startTimeStamp: timestamp,
|
||||||
endTimeStamp: new Date().toString(),
|
endTimeStamp: new Date().toISOString(),
|
||||||
processTime: performance.now() - start,
|
processTime: performance.now() - start,
|
||||||
host: req.hostname,
|
host: req.hostname,
|
||||||
method: req.method,
|
method: req.method,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue