Bug 1651325 - Only log action type in ignore middleware. r=bomsy.

The action object can hold complex data that would clutter the standard
output and make logs impoassible to parse (e.g. for treeherder).

Differential Revision: https://phabricator.services.mozilla.com/D84353
This commit is contained in:
Nicolas Chevobbe 2020-07-21 15:56:11 +00:00
Родитель 3017836fc5
Коммит 1bd580681b
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -21,7 +21,10 @@ function ignore({ getState }) {
} }
if (getState()[IGNORING]) { if (getState()[IGNORING]) {
console.warn("IGNORED REDUX ACTION:", action); // We only print the action type, and not the whole action object, as it can holds
// very complex data that would clutter stdout logs and make them impossible
// to parse for treeherder.
console.warn("IGNORED REDUX ACTION:", action.type);
return null; return null;
} }