File tree 2 files changed +19
-13
lines changed
2 files changed +19
-13
lines changed Original file line number Diff line number Diff line change @@ -39,13 +39,15 @@ export async function createPages({
39
39
} (use --verbose for breakdown)`
40
40
)
41
41
42
- reporter . verbose (
43
- `Number of node types: ${
44
- store . getState ( ) . nodesByType . size
45
- } . Nodes per type: ${ [ ...store . getState ( ) . nodesByType . entries ( ) ]
46
- . map ( ( [ type , nodes ] ) => type + `: ` + nodes . size )
47
- . join ( `, ` ) } `
48
- )
42
+ if ( process . env . gatsby_log_level === `verbose` ) {
43
+ reporter . verbose (
44
+ `Number of node types: ${
45
+ store . getState ( ) . nodesByType . size
46
+ } . Nodes per type: ${ [ ...store . getState ( ) . nodesByType . entries ( ) ]
47
+ . map ( ( [ type , nodes ] ) => type + `: ` + nodes . size )
48
+ . join ( `, ` ) } `
49
+ )
50
+ }
49
51
50
52
activity . end ( )
51
53
Original file line number Diff line number Diff line change @@ -24,7 +24,9 @@ export function logTransitions<T = DefaultContext>(
24
24
return
25
25
}
26
26
last = state
27
- reporter . verbose ( `Transition to ${ JSON . stringify ( state . value ) } ` )
27
+ if ( process . env . gatsby_log_level === `verbose` ) {
28
+ reporter . verbose ( `Transition to ${ JSON . stringify ( state . value ) } ` )
29
+ }
28
30
// eslint-disable-next-line no-unused-expressions
29
31
service . children ?. forEach ( child => {
30
32
// We want to ensure we don't attach a listener to the same
@@ -40,11 +42,13 @@ export function logTransitions<T = DefaultContext>(
40
42
return
41
43
}
42
44
sublast = substate
43
- reporter . verbose (
44
- `Transition to ${ JSON . stringify ( state . value ) } > ${ JSON . stringify (
45
- substate . value
46
- ) } `
47
- )
45
+ if ( process . env . gatsby_log_level === `verbose` ) {
46
+ reporter . verbose (
47
+ `Transition to ${ JSON . stringify ( state . value ) } > ${ JSON . stringify (
48
+ substate . value
49
+ ) } `
50
+ )
51
+ }
48
52
} )
49
53
listeners . add ( child )
50
54
}
You can’t perform that action at this time.
0 commit comments