[RESOLVED] How quickly should logs rotate?
-
My Rule and Engine levels are at 5. But I've never touched them personally. Maybe these are inherited from a build long ago? Should these be a 4?
--- logging: default: level: 4 streams: - type: console level: 0 - type: file name: "reactor.log" maxsize: 3 # megabytes max size keep: 9 # copies of old logs # # capture_console: if true, (most) console output will be captured to # this stream (if you have multiple streams, this # feature can only be used by ONE of them). If you # turn this on (true), set the "console" type stream # (above) log level to 0 to avoid duplicate logging # entries. The default is false, console not captured. #capture_console: true app: level: 4 httpapi: level: 4 httpproxy: level: 4 wsapi: level: 4 Structure: level: 4 Controller: level: 4 OWMWeatherController: level: 4 VeraController: level: 4 HubitatController: level: 4 HassController: level: 4 Rule: level: 5 Engine: level: 5
-
OK, any hints in the log? Anything other than Rule:INFO? If not, do you have a lot of rules triggered by frequent entity updates? I've moved my most frequent entities triggering rules to global expressions resulting in true/false, and used the expression as trigger instead to lower log entries of rule evaluation every 5-10 seconds so my 5, 2MB kept logs, span from late morning to early evening. 9, 3MB in 45 minutes doesn't seem normal to me.
I have all my loglevels at 4.Edit: "doesn't seem normal to me."
If the devices triggering the rules are extremely chatty, the amount of logging is of course "normal". -
It does appear to mostly be related to rules that have to do with my Life360 presence sensors.
Correction to my log level comment above. Changing the rules and engine to 4 did slow things down a bit. I saved that changed and restarted my docker at 7:43 AM. I'm just shy of 2 hours now to fill/rotate all 9 logs.
-
It does appear to mostly be related to rules that have to do with my Life360 presence sensors.
Correction to my log level comment above. Changing the rules and engine to 4 did slow things down a bit. I saved that changed and restarted my docker at 7:43 AM. I'm just shy of 2 hours now to fill/rotate all 9 logs.
If I am understanding your global expressions correctly. Are you saying you moved your rule triggers to an expression and then changed the trigger to be the value of the expression?
Original rule checking presence:
When Life360 updates, won't it force the expression to revalidate its value? Are these not logged?
-
-
Thank you. I changed all my rules that had a presence sensor written in them. As well as a few other rules that have an app that phones home every minute. Just restarted MSR for good measure and can see a different. I'm over 30 minutes right now between .log and .log.1.
-
Note that you can also set the logging level for rules to level 3, and it would eliminate all of the log entries for when evaluations are being triggered and what is triggering them.
Another option is to set the log level for specific rules to a lower (quieter) value. You need to know the rule ID, which is displayed when you open the rule detail panel on the Rule Sets page (click the right-pointing arrow next to the rule name to open the panel; the ID is at the bottom of the panel).
Rule: # log level for all rules level: 4 # Override default Rule log level for a specific rule "Rule#rule-la04ghp7": # note quotes must be used here level: 3
-
Note that you can also set the logging level for rules to level 3, and it would eliminate all of the log entries for when evaluations are being triggered and what is triggering them.
Another option is to set the log level for specific rules to a lower (quieter) value. You need to know the rule ID, which is displayed when you open the rule detail panel on the Rule Sets page (click the right-pointing arrow next to the rule name to open the panel; the ID is at the bottom of the panel).
Rule: # log level for all rules level: 4 # Override default Rule log level for a specific rule "Rule#rule-la04ghp7": # note quotes must be used here level: 3
@toggledbits Awesome. Thank you.
I know you know, but for others, the rule ID is also noted in the logs. Makes it easier to copy and paste without having to look up the ID within the GUI.
-
T toggledbits locked this topic on