Any way in OH2 to stop every Item State Change being event logged [ItemStateChangedEvent]?

Hi @jtmoderate876,

Sure. There are 2 ways to modify logging levels in OH2 (for events or other log types):

  • Via Karaf
  1. Enter in Karaf Console: sudo ssh openhab@localhost -p 8101 with password habopen
  2. Show the current log levels: log:list
  3. Change the smarthome.event to a lower log level (from max to min: TRACE, DEBUG, INFO, WARN, ERROR, FATAL): log:set WARN smarthome.event

OR

  • Via Files
  1. sudo nano /usr/share/openhab2/runtime/karaf/etc/org.ops4j.pax.logging.cfg
  2. set: log4j.logger.smarthome.event = WARN, event, osgi:*

I usually use the first method and I perform this step everytime I upgrade my OH2 snapshot because the logging configuration is overwritten after an upgrade.

For more detailed info, check out @rlkoshak 's excellent post here:

BR,
Dim

9 Likes