Fronttail - Reducing Info Log Messages Possible?

Hello Experts,

OH 4.3.0, on RPI3+

I have a lot of INFO messages that come in via MQTT 10-20 /min from a Solar Charge Controller Monitor

These tend to overwhelm and make the logs difficult to read when looking for other things. If this was DEBUG I’d simply turn it off, but can I do the same with general INFO messages?

I can monitor the fact that data is still coming in by using the Grafana tool that the data is sent to, just need less of it in the Frontail log display

Thanks

Since there is no 4.3.0, do you mean 3.4.0 or 4.0.0 snapshot?

I assume you are referring to events.log? If so then that is the log for the EventBus. You can’t pick and choose which bindings events are logged on the bus. You can either show all ItemChangedEvents (for example) or no ItemChangedEvents.

So, if you can monitor events using Grafana, you can turn off events.log entirely. If you don’t need to see those events, don’t bother logging them. You can set the level for the openhab.event loggers in userdata/etc/log4j2.xml to ERROR (or using the karaf console).

If you need events.log, then you can and should use the filters built into Frontail to filter them so you only see what’s relevant to you at a time. It uses regular expressions so see How to watch and look through logging for how to include or exclude specific log statements on the fly.

As a last resort you can filter specific logs in the log4j2.xml file using filters on the log appenders. See Log4j – Log4j Filters - Apache Log4j 2. However, I’m of the opinion that either events.log is useful in its entirety or it isn’t. So it’s best to include all the events and use filters on Frontail to cut out those lines you don’t care about on the fly, or events.log should just be disabled in its entirety.

Thanks Rich

Yes I come from the future and dropped in to see what life was like in 2023 :slight_smile:
Ok I transcribed the 4 & 3!!

I want Events.log and I know how to filter logs even just doing it in the browser, but the risk is unless I look for problems or I’m aware of a problem to look for the log is just

==> /var/log/openhab/events.log <==

2023-01-12 11:37:47.319 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'sChargeCurrent' changed from 0.1 to 0

2023-01-12 11:37:47.334 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'ChargePower' changed from 1.26 to 0.0

2023-01-12 11:37:59.639 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'SolarVoltage' changed from 14 to 13.8

2023-01-12 11:38:07.402 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'sStateofCharge' changed from 75 to 74

2023-01-12 11:38:09.399 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'SolarVoltage' changed from 13.8 to 14

2023-01-12 11:38:17.429 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'sStateofCharge' changed from 74 to 75

2023-01-12 11:38:28.365 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'ZWaveSerialController_SerialAck' changed from 3758 to 3759

2023-01-12 11:38:29.487 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'SolarVoltage' changed from 14 to 14.1

2023-01-12 11:39:14.630 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'DayofWeek' changed from 2023-01-12T11:29:14.623-0500 to 2023-01-12T11:39:14.626-0500

2023-01-12 11:39:39.759 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'SolarVoltage' changed from 14.1 to 13.9

2023-01-12 11:39:49.794 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'SolarVoltage' changed from 13.9 to 14

2023-01-12 11:39:57.819 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'sStateofCharge' changed from 75 to 74

2023-01-12 11:39:59.838 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'SolarVoltage' changed from 14 to 14.2

2023-01-12 11:40:00.129 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'ObservationTime' changed from 2023-01-12T10:39:57.000-0500 to 2023-01-12T11:39:59.000-0500

2023-01-12 11:40:00.132 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Temp_Now' changed from 2.24 to 2.79

2023-01-12 11:40:00.141 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Pressure' changed from 1010 to 1009

2023-01-12 11:40:00.146 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Wind_Speed' changed from 1.13 to 2.23

2023-01-12 11:40:00.162 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Temp_Max' changed from 2.24 to 2.79

2023-01-12 11:40:07.870 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'sStateofCharge' changed from 74 to 75

2023-01-12 11:40:19.929 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'SolarCurrent' changed from 0.1 to 0

2023-01-12 11:40:19.935 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'SolarPower' changed from 1 to 0

2023-01-12 11:40:29.943 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'SolarCurrent' changed from 0 to 0.1

2023-01-12 11:40:29.962 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'SolarVoltage' changed from 14.2 to 14

2023-01-12 11:40:29.978 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'SolarPower' changed from 0 to 1

2023-01-12 11:40:40.002 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'SolarVoltage' changed from 14 to 13.9

2023-01-12 11:40:50.033 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'SolarVoltage' changed from 13.9 to 14

All day long, I’ll need to see if I can somehow work out how to send less logs or I’ll have to instead put Grafana on the PiZero that monitors the BT messages from the Solar Controller and review the graphs from there. I kind of liked seeing them in my opehab UI, perhaps there is a way to display graphs from a remote grafana instance on OH?

I’ll look into it.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.