File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 6
6
INTERACTION_PART_REQUEST ,
7
7
INTERACTION_PART_RESPONSE ,
8
8
} from '../ffi/types' ;
9
- import { logCrashAndThrow , logErrorAndThrow } from '../logger' ;
9
+ import { getLogLevel , logCrashAndThrow , logErrorAndThrow } from '../logger' ;
10
10
import { wrapAllWithCheck , wrapWithCheck } from './checkErrors' ;
11
11
12
12
import {
@@ -25,9 +25,10 @@ type JsonArray = Array<AnyJson>;
25
25
export const makeConsumerPact = (
26
26
consumer : string ,
27
27
provider : string ,
28
- version : FfiSpecificationVersion
28
+ version : FfiSpecificationVersion ,
29
+ logLevel = getLogLevel ( )
29
30
) : ConsumerPact => {
30
- const lib = getFfiLib ( ) ;
31
+ const lib = getFfiLib ( logLevel ) ;
31
32
32
33
const pactPtr = lib . pactffi_new_pact ( consumer , provider ) ;
33
34
if ( ! lib . pactffi_with_specification ( pactPtr , version ) ) {
Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ export const setLogLevel = (level: LogLevel = 'info'): void => {
16
16
logger = createLogger ( currentLogLevel ) ;
17
17
} ;
18
18
19
+ export const getLogLevel = ( ) : LogLevel => currentLogLevel ;
20
+
19
21
export const verboseIsImplied = ( ) : boolean =>
20
22
currentLogLevel === 'trace' || currentLogLevel === 'debug' ;
21
23
You can’t perform that action at this time.
0 commit comments