(Resolved) Too Many Persistence Log Entries in OpenHAB.log

  • Platform information:
    • Hardware: Raspberry 4 8GB
    • OS: Openhabian 3.3
    • Java Runtime Environment: Standard Openhabian 3.3
    • openHAB version: 3.3
    • Persistence: MariaDB
  • Issue of the topic:

I get each second multiple log entries in OpenHAB.log that are in relation to the persistence. These entries look like the below and whilst they are nice for statistical reasons, i do not see any add value other then they filling up my log files and soon a hardware provider can sell a new USB disk :slight_smile:

Has anyone an idea where i can switch off logging this information?

2022-08-19 12:03:46.403 [INFO ] [persistence.jdbc.internal.JdbcMapper] - JDBC::logTime: 'storeItemValue':
 afterAccess     = 3 ms
 timeAverage50  = 67 ms
 timeAverage100 = 67 ms
 timeAverage200 = 56 ms
 afterAccessMin  = 2 ms
 afterAccessMax  = 4120 ms
 1000Statements = 497 sec
 statementCount = 79

2022-08-19 12:03:46.410 [INFO ] [persistence.jdbc.internal.JdbcMapper] - JDBC::logTime: 'storeItemValue':
 afterAccess     = 4 ms
 timeAverage50  = 51 ms
 timeAverage100 = 67 ms
 timeAverage200 = 56 ms
 afterAccessMin  = 2 ms
 afterAccessMax  = 4120 ms
 1000Statements = 497 sec
 statementCount = 80

2022-08-19 12:03:46.417 [INFO ] [persistence.jdbc.internal.JdbcMapper] - JDBC::logTime: 'storeItemValue':
 afterAccess     = 2 ms
 timeAverage50  = 51 ms
 timeAverage100 = 67 ms
 timeAverage200 = 52 ms
 afterAccessMin  = 2 ms
 afterAccessMax  = 4120 ms
 1000Statements = 497 sec
 statementCount = 81

2022-08-19 12:03:46.423 [INFO ] [persistence.jdbc.internal.JdbcMapper] - JDBC::logTime: 'storeItemValue':
 afterAccess     = 3 ms
 timeAverage50  = 51 ms
 timeAverage100 = 67 ms
 timeAverage200 = 52 ms
 afterAccessMin  = 2 ms
 afterAccessMax  = 4120 ms
 1000Statements = 497 sec
 statementCount = 82

This looks like a mistake. That’s definitely a DEBUG or even a TRACE level log statement. So I recommend two steps.

  1. File an issue on the openhab-addons repo against the JDBC add-on to have this log statement changed to a lower level.

  2. In the mean time you can add the following to $OH_USERDATA/etc/log4j2.xml inside the <Loggers> tags.

<Logger level="WARN" name="org.openhab.persistence.jdbc"/>

Alternatively you can issue the command in the Karaf Console to change the log level.

Thanks a lot @rlkoshak !! Even though it was not the direct solution, your hint helped me a lot! I found the issue! To resolve:

  • OpenHAB Gui, login with openhabmin
  • Settings
  • JDBC Persistence Service
  • at the bottom “Timekeeping Enable” klick on “Disable”

Issue Resolved :+1:t4: :muscle:t4:

1 Like