ngrx-store-logger icon indicating copy to clipboard operation
ngrx-store-logger copied to clipboard

How to blacklist undefined actions

Open nybroe opened this issue 7 years ago • 1 comments

When using FileSaver (https://github.com/eligrey/FileSaver.js/) to download files to disk, it creates an action which is an instance of FileSaver and not an action type - but the reducer catches this action and returns the state as default - this doesn't break anything, it just creates a logging saying "action @ 14:00:13.959 undefined (in 3.59 ms)".

I have tried to blacklist this action in the loggingOptions, setting the blacklist as follows: filter: { blacklist: ['undefined'] }

I have also tried the following combinations:

1) filter: { blacklist: ['file-saver'] }

2) filter: { blacklist: ['FileSaver'] }

None of the above excludes the logging in the console. So my question is - how do I exclude undefined actions?

The logging looks like this: image

nybroe avatar Aug 17 '17 12:08 nybroe

The action seems to be an object instead of a string value, thus blacklist doesn't catch it. Could you please expand the action item logged?

ernestomancebo avatar Apr 04 '19 20:04 ernestomancebo