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 {
2929 const baseOptions = debug ? DEBUG_OPTIONS : PROD_OPTIONS
3030 // if defined, merge the custom implementation over the noop logger to avoid undefined lookups,
3131 // 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
3333 const initialReactorState = new ReactorState ( {
3434 debug : debug ,
3535 cache : config . cache || DefaultCache ( ) ,
36- logging : debug ? debugLogger : NoopLogger ,
36+ logger : debug ? debugLogger : NoopLogger ,
3737 // merge config options with the defaults
3838 options : baseOptions . merge ( config . options || { } ) ,
3939 } )
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ export function replaceStores(reactorState, stores) {
7373 * @return {ReactorState }
7474 */
7575export function dispatch ( reactorState , actionType , payload ) {
76- let logging = reactorState . get ( 'logging ' )
76+ let logging = reactorState . get ( 'logger ' )
7777
7878 if ( actionType === undefined && getOption ( reactorState , 'throwOnUndefinedActionType' ) ) {
7979 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({
4141 state : Map ( ) ,
4242 stores : Map ( ) ,
4343 cache : DefaultCache ( ) ,
44- logging : NoopLogger ,
44+ logger : NoopLogger ,
4545 // maintains a mapping of storeId => state id (monotomically increasing integer whenever store state changes)
4646 storeStates : Map ( ) ,
4747 dirtyStores : Set ( ) ,
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ describe('Reactor', () => {
7878 it ( 'should use dispatchStart on the provided logging handler if defined' , ( ) => {
7979 var reactor = new Reactor ( {
8080 debug : true ,
81- logging : handler ,
81+ logger : handler ,
8282 } )
8383
8484 reactor . dispatch ( 'setTax' , 5 )
@@ -88,7 +88,7 @@ describe('Reactor', () => {
8888 it ( 'should use dispatchEnd on the provided logging handler if defined' , ( ) => {
8989 var reactor = new Reactor ( {
9090 debug : true ,
91- logging : handler ,
91+ logger : handler ,
9292 } )
9393
9494 reactor . dispatch ( 'setTax' , 5 )
@@ -98,7 +98,7 @@ describe('Reactor', () => {
9898 it ( 'should use dispatchError on the provided logging handler if defined' , ( ) => {
9999 var reactor = new Reactor ( {
100100 debug : true ,
101- logging : handler ,
101+ logger : handler ,
102102 options : {
103103 throwOnUndefinedActionType : false ,
104104 } ,
@@ -113,7 +113,7 @@ describe('Reactor', () => {
113113 it ( 'should use the NoopLogger implementation when a logging function is not defined on the custom implementation' , ( ) => {
114114 var reactor = new Reactor ( {
115115 debug : true ,
116- logging : {
116+ logger : {
117117 dispatchStart ( ) { } ,
118118 dispatchEnd ( ) { } ,
119119 } ,
You can’t perform that action at this time.
0 commit comments