Skip to content

Commit

Permalink
fix(logging): set pact-node log level before constructing server #139
Browse files Browse the repository at this point in the history
  • Loading branch information
mefellows committed Jan 6, 2018
1 parent 1506e19 commit b2f5c2d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pact.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ export class Pact {
if (isEmpty(this.opts.provider)) {
throw new Error("You must specify a Provider for this pact.");
}


serviceFactory.logLevel(this.opts.logLevel);
this.server = serviceFactory.createServer({
consumer: this.opts.consumer,
cors: this.opts.cors,
Expand All @@ -69,7 +70,6 @@ export class Pact {
sslcert: this.opts.sslcert,
sslkey: this.opts.sslkey,
});
serviceFactory.logLevel(this.opts.logLevel);

logger.info(`Setting up Pact with Consumer "${this.opts.consumer}" and Provider "${this.opts.provider}"
using mock service on Port: "${this.opts.port}"`);
Expand Down

0 comments on commit b2f5c2d

Please sign in to comment.