refactor(middleware-logger): adjusted middleware to changed Effect interface
MODIFY
packages/middleware-logger/src/logger.middleware.ts
packages/middleware-logger/src/logger.middleware.ts
@@ -3,10 +3,10 @@ import { timestamp, tap, map } from 'rxjs/operators';
import { LoggerOptions } from './logger.model';
import { loggerHandler } from './logger.handler';
-export const logger$ = (opts: LoggerOptions = {}): HttpMiddlewareEffect => (req$, res) =>
+export const logger$ = (opts: LoggerOptions = {}): HttpMiddlewareEffect => (req$, meta) =>
req$.pipe(
timestamp(),
- tap(loggerHandler(res, opts)),
+ tap(loggerHandler(meta.client, opts)),
map(({ value: req }) => req),
);
@@ -15,7 +15,7 @@ export const logger$ = (opts: LoggerOptions = {}): HttpMiddlewareEffect => (req$
* [#2] will be deleted in version 3.0,
* [#3] use logger$ instead,
*/
-export const loggerWithOpts$ = (opts: LoggerOptions = {}): HttpMiddlewareEffect => (req$, res, meta) => {
+export const loggerWithOpts$ = (opts: LoggerOptions = {}): HttpMiddlewareEffect => (req$, meta) => {
console.warn('Deprecation warning: loggerWithOpts$ is deprecated since v2.0 and will be removed in v3.0. Use logger$ instead.');
- return logger$(opts)(req$, res, meta);
+ return logger$(opts)(req$, meta);
};

refactor(middleware-logger): adjusted middleware to changed Effect interface