Skip to main content

LoggingInterceptor

Upgather SDK


Upgather SDK / LoggingInterceptor

Class: LoggingInterceptor

Defined in: lib/interceptors/LoggingInterceptor.ts:13

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

Defined in: lib/interceptors/LoggingInterceptor.ts:23

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

Defined in: lib/interceptors/LoggingInterceptor.ts:37

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