Add this anywhere in the file and then restart openhab.
############ CUSTOM FILTERS START HERE #################
# filter out 2.4.0 stable warnings that can be ignored
log4j2.appender.out.filter.jettyWarn.type = RegexFilter
log4j2.appender.out.filter.jettyWarn.regex = .*(URI is too large >8192|while writing a response message entity to the container output stream).*
log4j2.appender.out.filter.jettyWarn.onMatch = DENY
log4j2.appender.out.filter.jettyWarn.onMisMatch = ACCEPT
################# END OF CUSTOM FILTERS ################
Then when you want to just delete the lines if you ever move to a newer Openhab version.
log4j2.appender.out.filter.jettyWarn.regex = .*(URI is too large >8192|while writing a response message entity to the container output stream).*
can I just delete the bit between ** and add my own message? like the below. Ive tried it but the log is still getting hammered with these messages
Im trying to filter the Karaf Console
# filter out 2.4.0 stable warnings that can be ignored
log4j2.appender.out.filter.jettyWarn.type = RegexFilter
log4j2.appender.out.filter.jettyWarn.regex = .*An I/O error has occurred while writing a response message entity to the container output stream.*
log4j2.appender.out.filter.jettyWarn.onMatch = DENY
log4j2.appender.out.filter.jettyWarn.onMisMatch = ACCEPT
Yes you can but sometimes longer strings don’t match, why I don’t know which is why I used a shorter string. Also did the file already exist? Maybe your file is located here userdata/etc/org.ops4j.pax.logging.cfg
There are a lot of different ways to achieve similar things, see this thread…