# 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.
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.
- Session & cookies
- Passport.js
- TypeORM
- Mongoose
- GraphQL
- Socket.io
- Swagger
- AJV
- Multer
- Serve static files
- Templating
- Throw HTTP Exceptions
- Customize 404
- AWS
- Jest
- Seq
- Controllers
- Providers
- Model
- Converters
- Middlewares
- Pipes
- Interceptors
- Authentication
- Hooks
- Injection scopes
- Custom providers
- Custom endpoint decorator
- Testing