Skip to content

Commit

Permalink
fix: apply logLevel to local logger
Browse files Browse the repository at this point in the history
  • Loading branch information
vgrigoruk authored and mefellows committed Nov 7, 2018
1 parent 8aef768 commit 6e31407
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/pact.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { Interaction, InteractionObject } from "./dsl/interaction";
import { isEmpty } from "lodash";
import { isPortAvailable } from "./common/net";
import logger from "./common/logger";
import { LogLevels } from "@pact-foundation/pact-node/src/logger";
import { MockService } from "./dsl/mockService";
import { PactOptions, PactOptionsComplete } from "./dsl/options";
import { Server } from "@pact-foundation/pact-node/src/server";
Expand Down Expand Up @@ -60,6 +61,7 @@ export class Pact {
throw new Error("You must specify a Provider for this pact.");
}

logger.level(this.opts.logLevel as LogLevels);
serviceFactory.logLevel(this.opts.logLevel);
this.server = serviceFactory.createServer({
consumer: this.opts.consumer,
Expand Down

0 comments on commit 6e31407

Please sign in to comment.