# LogIncomingRequestMiddleware Class

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

# Overview

class LogIncomingRequestMiddleware implements IMiddleware {
    protected static DEFAULT_FIELDS: string[];
    $onResponse: any;
    protected settings: ILoggerSettings;
    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;
}