mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
fix(freight-permissions): split company stamp from per-officer teeter permission
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { randomUUID } from "node:crypto";
|
||||
import { Injectable, Logger, NestMiddleware } from "@nestjs/common";
|
||||
import { Injectable, NestMiddleware } from "@nestjs/common";
|
||||
|
||||
import {
|
||||
RequestLogContext,
|
||||
@@ -58,8 +58,6 @@ const userId = (req: LoggedRequest): string | undefined => {
|
||||
*/
|
||||
@Injectable()
|
||||
export class RequestLogMiddleware implements NestMiddleware {
|
||||
private readonly logger = new Logger("HTTP");
|
||||
|
||||
use(req: LoggedRequest, res: LoggedResponse, next: () => void): void {
|
||||
const start = Date.now();
|
||||
const requestId = header(req, "x-request-id") ?? randomUUID();
|
||||
@@ -85,8 +83,6 @@ export class RequestLogMiddleware implements NestMiddleware {
|
||||
const status = res.statusCode;
|
||||
const durationMs = Date.now() - start;
|
||||
|
||||
this.logger.log(`${req.method} ${url} ${status} ${durationMs}ms`);
|
||||
|
||||
const line = {
|
||||
...ctx,
|
||||
// Fields the Nest console prefix used to carry. They are IN the JSON
|
||||
|
||||
Reference in New Issue
Block a user