Skip to content

Commit

Permalink
respect env.REDUX_LOG and remove double log
Browse files Browse the repository at this point in the history
  • Loading branch information
krystophv committed Feb 23, 2017
1 parent 05c64df commit 93ea4c7
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions app/store/configureStore.development.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,24 @@ api.create({
version: config.version
});

const noop = function(middlewareAPI){
return function(next){
return function(action){
return next(action);
};
};
};

const actionCreators = {
...async,
...sync,
push,
};

const logger = createLogger({
const logger = __REDUX_LOG__ ? createLogger({
level: 'info',
collapsed: true
});
}) : noop;

const router = routerMiddleware(hashHistory);

Expand All @@ -46,7 +54,6 @@ const enhancer = composeEnhancers(
thunk,
router,
logger,
createLogger(),
createErrorLogger(api),
createMetricsTracker(api)
)
Expand Down

0 comments on commit 93ea4c7

Please sign in to comment.