# LogIncomingRequestMiddleware Class

import { LogIncomingRequestMiddleware } from "@tsed/common"

# Overview

class LogIncomingRequestMiddleware implements IMiddleware {
    protected static DEFAULT_FIELDS: string[];
    $onResponse: any;
    protected settings: ILoggerSettings;
    constructor(injector: InjectorService);
    use(request: Req): void;
    protected onLogStart(request: Req): void;
    protected onLogEnd(request: Req, response: Res): void;
    protected configureRequest(request: Req): void;
    protected requestToObject(request: Req): any;
    protected minimalRequestPicker(request: Req): any;

# Members

protected static DEFAULT_FIELDS: string[]

$onResponse: any

protected settings: ILoggerSettings

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.