File tree Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -29,11 +29,11 @@ class Reactor {
29
29
const baseOptions = debug ? DEBUG_OPTIONS : PROD_OPTIONS
30
30
// if defined, merge the custom implementation over the noop logger to avoid undefined lookups,
31
31
// otherwise, just use the built-in console group logger
32
- const debugLogger = config . logging ? extend ( { } , NoopLogger , config . logging ) : ConsoleGroupLogger
32
+ const debugLogger = config . logger ? extend ( { } , NoopLogger , config . logger ) : ConsoleGroupLogger
33
33
const initialReactorState = new ReactorState ( {
34
34
debug : debug ,
35
35
cache : config . cache || DefaultCache ( ) ,
36
- logging : debug ? debugLogger : NoopLogger ,
36
+ logger : debug ? debugLogger : NoopLogger ,
37
37
// merge config options with the defaults
38
38
options : baseOptions . merge ( config . options || { } ) ,
39
39
} )
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ export function replaceStores(reactorState, stores) {
73
73
* @return {ReactorState }
74
74
*/
75
75
export function dispatch ( reactorState , actionType , payload ) {
76
- let logging = reactorState . get ( 'logging ' )
76
+ let logging = reactorState . get ( 'logger ' )
77
77
78
78
if ( actionType === undefined && getOption ( reactorState , 'throwOnUndefinedActionType' ) ) {
79
79
throw new Error ( '`dispatch` cannot be called with an `undefined` action type.' ) ;
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ export const ReactorState = Record({
41
41
state : Map ( ) ,
42
42
stores : Map ( ) ,
43
43
cache : DefaultCache ( ) ,
44
- logging : NoopLogger ,
44
+ logger : NoopLogger ,
45
45
// maintains a mapping of storeId => state id (monotomically increasing integer whenever store state changes)
46
46
storeStates : Map ( ) ,
47
47
dirtyStores : Set ( ) ,
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ describe('Reactor', () => {
78
78
it ( 'should use dispatchStart on the provided logging handler if defined' , ( ) => {
79
79
var reactor = new Reactor ( {
80
80
debug : true ,
81
- logging : handler ,
81
+ logger : handler ,
82
82
} )
83
83
84
84
reactor . dispatch ( 'setTax' , 5 )
@@ -88,7 +88,7 @@ describe('Reactor', () => {
88
88
it ( 'should use dispatchEnd on the provided logging handler if defined' , ( ) => {
89
89
var reactor = new Reactor ( {
90
90
debug : true ,
91
- logging : handler ,
91
+ logger : handler ,
92
92
} )
93
93
94
94
reactor . dispatch ( 'setTax' , 5 )
@@ -98,7 +98,7 @@ describe('Reactor', () => {
98
98
it ( 'should use dispatchError on the provided logging handler if defined' , ( ) => {
99
99
var reactor = new Reactor ( {
100
100
debug : true ,
101
- logging : handler ,
101
+ logger : handler ,
102
102
options : {
103
103
throwOnUndefinedActionType : false ,
104
104
} ,
@@ -113,7 +113,7 @@ describe('Reactor', () => {
113
113
it ( 'should use the NoopLogger implementation when a logging function is not defined on the custom implementation' , ( ) => {
114
114
var reactor = new Reactor ( {
115
115
debug : true ,
116
- logging : {
116
+ logger : {
117
117
dispatchStart ( ) { } ,
118
118
dispatchEnd ( ) { } ,
119
119
} ,
You can’t perform that action at this time.
0 commit comments