зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1525406 - Only log actions when desired r=Standard8
Prevents any output coming from the debugger logging actions Differential Revision: https://phabricator.services.mozilla.com/D31660 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
d1648e5525
Коммит
d51f25b15e
|
@ -97,13 +97,15 @@ export function log({ dispatch, getState }: ThunkArgs) {
|
|||
return (next: any) => (action: any) => {
|
||||
const asyncMsg = !action.status ? "" : `[${action.status}]`;
|
||||
|
||||
if (isTesting() && prefs.logActions) {
|
||||
// $FlowIgnore
|
||||
dump(
|
||||
`[ACTION] ${action.type} ${asyncMsg} - ${serializeAction(action)}\n`
|
||||
);
|
||||
} else {
|
||||
console.log(action, asyncMsg);
|
||||
if (prefs.logActions) {
|
||||
if (isTesting()) {
|
||||
// $FlowIgnore
|
||||
dump(
|
||||
`[ACTION] ${action.type} ${asyncMsg} - ${serializeAction(action)}\n`
|
||||
);
|
||||
} else {
|
||||
console.log(action, asyncMsg);
|
||||
}
|
||||
}
|
||||
|
||||
next(action);
|
||||
|
|
Загрузка…
Ссылка в новой задаче