-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allows an alter an event and allows to stop sending it as well #18
Comments
You should do something like:
Because there could be a case where the |
@RoySegall first of all thanks for pointing that out! I have it wrong, true, but I think the following would be enough for this particular case:
Simply if $event['send'] is not set to something positive, then we skip sending event to the log service. |
So, in that case, we need to make sure that all the events will have the |
@RoySegall I hope the link to my patch isn't broken, but actually all the events already have
|
I think that's OK but there are 2 missing:
Except that, @ordavidil Any thoughts on this one? |
@RoySegall PR: #20 |
looks awesome. Let's wait for tests. |
I just wondered why this is not done by overriding the "enabled" flag in the config via settings.php? This should achieve the same? |
@fago If you would have config split per environment then yes. But if you have one config for all environments and you want to disable sending messages only on develop, then you have to keep your logs enabled and just disable sending to server. That was idea behind that flag. |
@fago my bad, so you mean to override config in settings.php with |
for a commerce based project it is really important to keep all the messages around checkout and even for other projects it is possible that we want to keep messages of the all the types only for particular scenario and not for each and every message (for instance, info messages when user login but no messages around successful cron jobs) +1 to this issue and IMO even solution is generic enough and would allow custom modules to control what to log and what not to log. |
Yep, this would be awesome, then I could create a module that would allow filtering logged events based on type and / or severity. |
We would need a feature to extend an event array and also have an ability to completely prevent sending to the log service. Mostly because of environments which are not able to send the events.
At the moment I patched it with this patch. Allowing modules to alter an event and also send a flag to prevent sending completely.
The text was updated successfully, but these errors were encountered: