I thought the purpose of logging war to log what happens for historical and troubleshooting purposes. In that case, the lines make perfect sense.
What do you see as the purpose of logging?
Thanks, I know what logging is for.
I don’t want these two lines. I know the rule is running if stuff happens (or not)
I intend to migrate all my rules to jython in the near future and there will be thousands of those lines spamming my log file. I don’t want them
I’ve setup loggers and appenders so that my automation logging goes to two separate files, one for core and one for jsr223. Let me know if you are interested in those. This helps a lot! It looks like you are viewing both the openhab.log and events.log, so you could turn off the logging for…
I’ll just pipe in to mention that those log statements are coming from events.log and therefore reflect events that are occurring on the event bus. So it is fairly reasonable for these lines to appear in events.log. However, mapping a Rule’s UUID with it’s more human friendly name is a pain so the current utility of these log statements is pretty low.
@5iver, is it possible to replace the UUID with the Rule name at all or are we stuck with the UUID? I realize this might require a PR to the core to change the line that logs that out. I did a quick search and couldn’t find the line, or don’t know enough to recognize the line.
You’d think the simplest thing to do would be to just add the rule’s name to the log entry. Unfortunately, the rule name is not available everywhere it would be needed to include in the logs, so this is not quick and easy. I worked on this a bit last year and had something partially working (there are some commits somewhere… probably in ESH), but ended up scrapping it, since I preferred putting the effort into making the rule UIDs configurable. Early on, the rule ID could be set and there are some remnants of this in the Python helper libraries. Currently, it cannot be set when SimpleRule is used and this is somewhere near the bottom of my backlog .
The UIDs of triggers are configurable, so I included friendly names for the triggers in the Python decorators. I’ll do the same with the rule names when their UIDs are configurable…
2019-11-06 10:38:46.257 [DEBUG] [org.openhab.core.automation.internal.RuleEngineImpl] - The trigger 'Item-HEM1_Total_Power-changed_f39ec971fd0e11e9aeb0001bb952f560_f39ec972fd0e11e9a861001bb952f560' of rule '0fedf70d-9d58-40f9-8aff-a6a29b2ea303' is triggered.
2019-11-06 10:38:46.258 [DEBUG] [org.openhab.core.automation.internal.RuleEngineImpl] - The rule '0fedf70d-9d58-40f9-8aff-a6a29b2ea303' is executed.
2019-11-06 10:38:47.546 [DEBUG] [org.openhab.core.automation.internal.RuleEngineImpl] - The trigger 'Item-Weather_SolarRadiation-received-update_b553430fff9a11e99056001bb952f560_b5534310ff9a11e99b8d001bb952f560' of rule 'ef1d3c1f-3911-4656-b1e9-a882fa06f951' is triggered.
2019-11-06 10:38:47.548 [DEBUG] [org.openhab.core.automation.internal.RuleEngineImpl] - The rule 'ef1d3c1f-3911-4656-b1e9-a882fa06f951' is executed.
2019-11-06 10:38:47.557 [DEBUG] [org.openhab.core.automation.internal.RuleEngineImpl] - The rule 'd36c700a-69a7-4c0a-b2ec-655d73314bd1' is executed.
2019-11-06 10:38:47.558 [DEBUG] [org.openhab.core.automation.internal.RuleEngineImpl] - The trigger 'Item-Weather_SolarRadiation_Corrected-changed_e32f540ffd0e11e99bf6001bb952f560_e32f5410fd0e11e98991001bb952f560' of rule 'd36c700a-69a7-4c0a-b2ec-655d73314bd1' is triggered.
2019-11-06 10:39:05.799 [DEBUG] [org.openhab.core.automation.internal.RuleEngineImpl] - The trigger 'Time_cron_5_0_3_e576ac00fd0e11e9bf64001bb952f560_e576ac01fd0e11e9b371001bb952f560' of rule '3cce1729-4479-4eff-8c0f-9857abc61a29' is triggered.
2019-11-06 10:39:06.212 [DEBUG] [org.openhab.core.automation.internal.RuleEngineImpl] - The rule '3cce1729-4479-4eff-8c0f-9857abc61a29' is executed.
2019-11-06 10:39:16.249 [DEBUG] [org.openhab.core.automation.internal.RuleEngineImpl] - The trigger 'Item-HEM1_Total_Power-changed_f39ec971fd0e11e9aeb0001bb952f560_f39ec972fd0e11e9a861001bb952f560' of rule '0fedf70d-9d58-40f9-8aff-a6a29b2ea303' is triggered.
2019-11-06 10:39:16.252 [DEBUG] [org.openhab.core.automation.internal.RuleEngineImpl] - The rule '0fedf70d-9d58-40f9-8aff-a6a29b2ea303' is executed.
That was going to be my next question. I agree, making them configurable would be an even better approach. There is no reason why it has to be a UUID. It only needs to be unique within that instance of OH so human readable names should be sufficient.