Skip to main content

LoggingInterceptor

Upgather SDK


Upgather SDK / LoggingInterceptor

Class: LoggingInterceptor

Logs HTTP request details.

Remarks​

This interceptor implements the RequestInterceptor interface and is used to log details of HTTP requests for debugging or monitoring purposes.

Implements​

Constructors​

new LoggingInterceptor()​

new LoggingInterceptor(logLevel, logger?): LoggingInterceptor

Creates an instance of LoggingInterceptor.

Parameters​

logLevel​

The level of logging to apply (default: 'basic')

"none" | "basic" | "detailed"

logger?​

LoggerInterface

Optional logger instance (default: DefaultLogger with info level)

Returns​

LoggingInterceptor

Methods​

intercept()​

intercept(request): HttpRequest

Logs the HTTP request and returns it unmodified.

Parameters​

request​

HttpRequest

The HTTP request to log.

Returns​

HttpRequest

The unmodified HTTP request.

Implementation of​

RequestInterceptor.intercept