You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is not really an issue!
Do you have a hint how to implement it to call a service posting the logs?
Your implementation works very fine logging into the console.
I tried to extend it by sending the logs to a server.
It doesn't seem to be possible to inject a request service with ReflectiveInjector.resolveAndCreate.
The properties didn't get set through injecting, so I've got a runtime error.
I think that would break the principles of pure function.
I'm new to this pattern. That's why I couldn't find any solution.
Is there one using your solution?
The text was updated successfully, but these errors were encountered:
You can create a "LogEffect" with dispatch: false, that runs on every action (without filtering with ofType) and PUT/POST the actions to a REST service in this effect.
I suggest to create a "loggable" interface, that actions have to implement in case they want to be logged.
So your effect could look like this:
@Effect({dispatch: false})publiclogAllActionsEffect$=this.action$.map((action: Action)=>{try{if(checkIfActionImplementsLoggableInterface(action)){this.restService.postYourAction(action);}/** * just catch the error, failing logging should not break your stream * */}catch(error){}});
This is not really an issue!
Do you have a hint how to implement it to call a service posting the logs?
Your implementation works very fine logging into the console.
I tried to extend it by sending the logs to a server.
It doesn't seem to be possible to inject a request service with ReflectiveInjector.resolveAndCreate.
The properties didn't get set through injecting, so I've got a runtime error.
I think that would break the principles of pure function.
I'm new to this pattern. That's why I couldn't find any solution.
Is there one using your solution?
The text was updated successfully, but these errors were encountered: