# LogIncomingRequestMiddleware Class deprecated middleware

Module
import { LogIncomingRequestMiddleware } from "@tsed/common"
Source/packages/common/src/platform/middlewares/LogIncomingRequestMiddleware.ts

# Overview

class LogIncomingRequestMiddleware implements IMiddleware {
    protected static DEFAULT_FIELDS: string[];
    $onResponse: any;
    protected settings: PlatformLoggerSettings;
    constructor(injector: InjectorService);
    /**
     * Handle the request.
     * @param {e.Request} request
     */
    use(request: Req): void;
    /**
     * The separate onLogStart() function will allow developer to overwrite the initial request log.
     * @param {e.Request} request
     */
    protected onLogStart(request: Req): void;
    /**
     * Called when the `$onResponse` is called by Ts.ED (through Express.end).
     * @param request
     * @param response
     */
    protected onLogEnd(request: Req, response: Res): void;
    /**
     * Attach all information that will be necessary to log the request. Attach a new `request.log` object.
     * @param request
     */
    protected configureRequest(request: Req): void;
    /**
     * Return complete request info.
     * @param request
     * @returns {Object}
     */
    protected requestToObject(request: Req): any;
    /**
     * Return a filtered request from global configuration.
     * @param request
     * @returns {Object}
     */
    protected minimalRequestPicker(request: Req): any;
}

# Members

protected static DEFAULT_FIELDS: string[];

$onResponse: any;

protected settings: PlatformLoggerSettings;

use(request: Req): void;

Handle the request.


protected onLogStart(request: Req): void;

The separate onLogStart() function will allow developer to overwrite the initial request log.


protected onLogEnd(request: Req, response: Res): void;

Called when the $onResponse is called by Ts.ED (through Express.end).


protected configureRequest(request: Req): void;

Attach all information that will be necessary to log the request. Attach a new request.log object.


protected requestToObject(request: Req): any;

Return complete request info.


protected minimalRequestPicker(request: Req): any;

Return a filtered request from global configuration.