I want to filter these log messages:
2018-07-09 18:29:29.049 [ERROR] [lfe.hap.impl.http.impl.BinaryHandler] - Exception in binary handler
java.io.IOException: Die Verbindung wurde vom Kommunikationspartner zurückgesetzt
at sun.nio.ch.FileDispatcherImpl.read0(Native Method) ~[?:?]
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39) [?:?]
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223) [?:?]
at sun.nio.ch.IOUtil.read(IOUtil.java:192) [?:?]
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380) [?:?]
at io.netty.buffer.UnpooledUnsafeDirectByteBuf.setBytes(UnpooledUnsafeDirectByteBuf.java:447) [232:org.openhab.io.homekit:2.3.0]
at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:880) [232:org.openhab.io.homekit:2.3.0]
at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:242) [232:org.openhab.io.homekit:2.3.0]
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:119) [232:org.openhab.io.homekit:2.3.0]
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511) [232:org.openhab.io.homekit:2.3.0]
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468) [232:org.openhab.io.homekit:2.3.0]
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382) [232:org.openhab.io.homekit:2.3.0]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354) [232:org.openhab.io.homekit:2.3.0]
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112) [232:org.openhab.io.homekit:2.3.0]
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137) [232:org.openhab.io.homekit:2.3.0]
at java.lang.Thread.run(Thread.java:748) [?:?]
2018-07-09 18:29:29.069 [ERROR] [.hap.impl.http.impl.AccessoryHandler] - Exception caught in web handler
java.io.IOException: Die Verbindung wurde vom Kommunikationspartner zurückgesetzt
at sun.nio.ch.FileDispatcherImpl.read0(Native Method) ~[?:?]
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39) [?:?]
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223) [?:?]
at sun.nio.ch.IOUtil.read(IOUtil.java:192) [?:?]
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380) [?:?]
at io.netty.buffer.UnpooledUnsafeDirectByteBuf.setBytes(UnpooledUnsafeDirectByteBuf.java:447) [232:org.openhab.io.homekit:2.3.0]
at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:880) [232:org.openhab.io.homekit:2.3.0]
at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:242) [232:org.openhab.io.homekit:2.3.0]
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:119) [232:org.openhab.io.homekit:2.3.0]
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511) [232:org.openhab.io.homekit:2.3.0]
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468) [232:org.openhab.io.homekit:2.3.0]
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382) [232:org.openhab.io.homekit:2.3.0]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354) [232:org.openhab.io.homekit:2.3.0]
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112) [232:org.openhab.io.homekit:2.3.0]
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137) [232:org.openhab.io.homekit:2.3.0]
at java.lang.Thread.run(Thread.java:748) [?:?]
I tried adding the following to the /var/lib/openhab2/etc/org.ops4j.pax.logging.cfg file, but it doesn’t work:
log4j2.appender.event.filter.floodstop.type = RegexFilter
log4j2.appender.event.filter.floodstop.regex = .*(Exception in binary handler|Exception caught in web handler).*
log4j2.appender.event.filter.floodstop.onMatch = DENY
log4j2.appender.event.filter.floodstop.onMisMatch = ACCEPT
Now I thought it could be the spaces in there, but even a filter without spaces doesn’t work:
log4j2.appender.event.filter.floodstop.type = RegexFilter
log4j2.appender.event.filter.floodstop.regex = .*(Wartezeit|Kommunikationspartner).*
log4j2.appender.event.filter.floodstop.onMatch = DENY
log4j2.appender.event.filter.floodstop.onMisMatch = ACCEPT
Can somebody help me filtering out these log messages?