revert(logs): remove request logging middleware
All checks were successful
Build / build (push) Successful in 31s
All checks were successful
Build / build (push) Successful in 31s
This commit is contained in:
parent
50d3f1d0a8
commit
9b07cc358b
@ -11,7 +11,6 @@ import homeRouter from "@server/routers/home.router";
|
||||
import guildRouter from "@server/routers/guild.router";
|
||||
import { attachGuilds } from "@server/middleware/attachGuilds";
|
||||
import { guildTabHelper } from "@server/middleware/guildTabHelper";
|
||||
import { requestLog } from "@server/middleware/requestLog";
|
||||
import { getLogger } from "./log";
|
||||
|
||||
const logger = getLogger(__filename);
|
||||
@ -23,7 +22,6 @@ app.set("view engine", "ejs");
|
||||
app.set("views", path.resolve(__dirname, "client/views"));
|
||||
app.use(express.urlencoded({ extended: true }));
|
||||
app.use(express.json());
|
||||
app.use(requestLog);
|
||||
|
||||
app.use("/public", express.static(path.resolve(__dirname, "client/public")));
|
||||
|
||||
|
@ -56,14 +56,6 @@ const consoleFormat = combine(
|
||||
})
|
||||
);
|
||||
|
||||
const consoleFormatHttp = combine(
|
||||
errors({ stack: true }),
|
||||
timestamp({ format: timestampFormat }),
|
||||
printf(({ timestamp, level, method, path, status, duration }) => {
|
||||
return `[${level}] ${timestamp} [${method}] (${status}) ${path} ${duration}ms`;
|
||||
})
|
||||
);
|
||||
|
||||
const fileFormat = combine(
|
||||
errors({ stack: true }),
|
||||
timestamp({ format: timestampFormat }),
|
||||
|
@ -1,18 +0,0 @@
|
||||
import { Request, Response, NextFunction } from "express";
|
||||
import { logger } from "@server/../log";
|
||||
|
||||
// const logger = getLogger(__filename);
|
||||
|
||||
export const requestLog = (request: Request, response: Response, next: NextFunction) => {
|
||||
// const start = Date.now();
|
||||
// response.on("finish", () => {
|
||||
// const duration = Date.now() - start;
|
||||
// httpLogger.info({
|
||||
// method: request.method,
|
||||
// path: request.path,
|
||||
// status: response.statusCode,
|
||||
// duration: duration
|
||||
// });
|
||||
// });
|
||||
next();
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user