mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-20 02:08:57 +00:00
Disable redux action logging by default
This commit is contained in:
@@ -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