diff --git a/packages/platform/common/src/builder/PlatformBuilder.ts b/packages/platform/common/src/builder/PlatformBuilder.ts index 377140b94d5..cdecd7f83c6 100644 --- a/packages/platform/common/src/builder/PlatformBuilder.ts +++ b/packages/platform/common/src/builder/PlatformBuilder.ts @@ -187,12 +187,6 @@ export class PlatformBuilder { this.log("Load routes"); await this.#adapter.beforeLoadRoutes(); - // istanbul ignore next - if (this.settings.get("logger.level") !== "off") { - const {PlatformLogMiddleware} = await import("@tsed/platform-log-middleware"); - this.app.use(PlatformLogMiddleware); - } - if (this.rootModule.$beforeRoutesInit) { await this.rootModule.$beforeRoutesInit(); // remove method to avoid multiple call and preserve hook order diff --git a/packages/platform/common/src/exports.ts b/packages/platform/common/src/exports.ts index 24c9b6e9500..e13a6f05126 100644 --- a/packages/platform/common/src/exports.ts +++ b/packages/platform/common/src/exports.ts @@ -4,7 +4,6 @@ import "@tsed/logger-file"; export * from "@tsed/di"; export {$log, Logger} from "@tsed/logger"; export * from "@tsed/platform-exceptions"; -export * from "@tsed/platform-log-middleware"; export * from "@tsed/platform-middlewares"; export * from "@tsed/platform-params"; export * from "@tsed/platform-response-filter"; diff --git a/packages/platform/platform-log-middleware/src/middlewares/PlatformLogMiddleware.ts b/packages/platform/platform-log-middleware/src/middlewares/PlatformLogMiddleware.ts index 9b80d1017b0..934ee350c7d 100644 --- a/packages/platform/platform-log-middleware/src/middlewares/PlatformLogMiddleware.ts +++ b/packages/platform/platform-log-middleware/src/middlewares/PlatformLogMiddleware.ts @@ -116,7 +116,7 @@ export class PlatformLogMiddleware implements MiddlewareMethods { case "info": return {...this.minimalRequestPicker(ctx), ...obj}; case "debug": - return withRequest ? {...this.requestToObject(ctx), ...obj} : obj; + return {...this.requestToObject(ctx), ...obj}; default: return {...this.requestToObject(ctx), ...obj}; }