Hi,
I would like to detect and react to a warning like this in openhab.log:
2023-02-05 11:32:17.990 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception:
java.lang.IllegalMonitorStateException: null
at java.util.concurrent.locks.ReentrantLock$Sync.tryRelease(ReentrantLock.java:149) ~[?:?]
at java.util.concurrent.locks.AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1302) ~[?:?]
at java.util.concurrent.locks.ReentrantLock.unlock(ReentrantLock.java:439) ~[?:?]
at org.openhab.binding.fineoffsetweatherstation.internal.service.GatewayQueryService.executeCommand(GatewayQueryService.java:123) ~[?:?]
at org.openhab.binding.fineoffsetweatherstation.internal.service.FineOffsetGatewayQueryService.executeCommand(FineOffsetGatewayQueryService.java:113) ~[?:?]
at org.openhab.binding.fineoffsetweatherstation.internal.service.FineOffsetGatewayQueryService.getMeasuredValues(FineOffsetGatewayQueryService.java:93) ~[?:?]
at org.openhab.binding.fineoffsetweatherstation.internal.handler.FineOffsetGatewayHandler.query(FineOffsetGatewayHandler.java:277) ~[?:?]
at org.openhab.binding.fineoffsetweatherstation.internal.handler.FineOffsetGatewayHandler.updateLiveData(FineOffsetGatewayHandler.java:159) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:829) [?:?]
However, the Log Reader binding when triggered by the [WARN] entry gives access only to the first line via the lastWarningEvent channel. Is there a simple way to also access the other lines belonging to that warning, e.g. to ensure to react only if “fineoffsetweatherstation” is part of the stacktrace?