Improve logging of active rules

* Mention valid rules and active rules.
* Rename variables accordingly and refactor the trigger related methods.
* Log whether a trigger rule has already been triggered.