Skip to content

Commit

Permalink
refactor log variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandro committed Dec 10, 2023
1 parent cac5818 commit 6317ad0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { SubscriptionPromise } from "./subscriptions";
import WebsocketTransport from "./transports/websocket";
import { Logger } from "winston";

const log = getLogger("dcrf");
const defaultLogger = getLogger("dcrf");

interface ISubscriptionDescriptor<S, P extends S> {
selector: S;
Expand Down Expand Up @@ -115,7 +115,7 @@ export class DCRFClient implements IStreamingAPI {
this.pkField = options.pkField ?? "pk";
this.ensurePkFieldInDeleteEvents =
options.ensurePkFieldInDeleteEvents ?? true;
this.logger = options.logger ?? log;
this.logger = options.logger ?? defaultLogger;

if (this.options.buildMultiplexedMessage)
this.buildMultiplexedMessage =
Expand Down
2 changes: 1 addition & 1 deletion src/transports/websocket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export class WebsocketTransport extends EventEmitter implements ITransport {
this.options = options;
this.socket = null;
this.hasConnected = false;
this.logger = logger || defaultLogger;
this.logger = logger ?? defaultLogger
}

@autobind
Expand Down

0 comments on commit 6317ad0

Please sign in to comment.