mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-10-06 07:48:38 +01:00
Disable redux action logging by default
This commit is contained in:
1 parent
332f19ac78
commit
64d5eb99b7
1 file changed
+4
-1
@@ -20,6 +20,9 @@ const log = createLogger('createStore');
|
||||
|
||||
const env = getEnvironment();
|
||||
|
||||
// Enabled by devs as-needed
|
||||
const REDUX_LOGGER_ENABLED = false;
|
||||
|
||||
const logger = createReduxLogger({
|
||||
predicate: (_getState, action) => {
|
||||
if (action.type === 'network/CHECK_NETWORK_STATUS') {
|
||||
@@ -80,7 +83,7 @@ const middlewareList = [
|
||||
thunk,
|
||||
dispatchItemsMiddleware,
|
||||
actionRateLogger,
|
||||
...(env === 'production' ? [] : [logger]),
|
||||
...(env === 'production' || !REDUX_LOGGER_ENABLED ? [] : [logger]),
|
||||
];
|
||||
|
||||
const enhancer = applyMiddleware(...middlewareList);
|
||||
|
||||
Reference in new issue
Block a user