feat: change format

This commit is contained in:
Methapon2001 2024-07-10 15:27:36 +07:00
parent 28122752fa
commit 7ab828ab50

View file

@ -28,7 +28,7 @@ async function logMiddleware(req: Request, res: Response, next: NextFunction) {
return originalJson.call(this, v);
};
const timestamp = new Date().toString();
const timestamp = new Date().toISOString();
const start = performance.now();
req.app.locals.logData = {};
@ -46,7 +46,7 @@ async function logMiddleware(req: Request, res: Response, next: NextFunction) {
logType: res.statusCode >= 500 ? "error" : res.statusCode >= 400 ? "warning" : "info",
systemName: "JWS-SOS",
startTimeStamp: timestamp,
endTimeStamp: new Date().toString(),
endTimeStamp: new Date().toISOString(),
processTime: performance.now() - start,
host: req.hostname,
sessionId: req.headers["x-session-id"],