# Log filtering in OH 3

**URL:** <https://community.openhab.org/t/log-filtering-in-oh-3/110376>\
**Category:** Runtime\
**Created:** [December 16, 2020, 7:22pm UTC](https://community.openhab.org/t/log-filtering-in-oh-3/110376 "2020-12-16T19:22:57Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![markus7017](https://community.openhab.org/user_avatar/community.openhab.org/markus7017/32/39859_2.png) [@markus7017](https://community.openhab.org/u/markus7017)\
**Post date:** [December 18, 2020, 11:25am UTC](https://community.openhab.org/t/log-filtering-in-oh-3/110376/3 "2020-12-18T11:25:40Z")

</div>

that brings us to

- changing userdata/etc/log4j2.xml
- insert “…” under RollingFile openhab.log and/or events.log

correct?

```auto
...
		<!-- Rolling file appender -->
		<RollingFile fileName="${sys:openhab.logdir}/openhab.log" filePattern="${sys:openhab.logdir}/openhab.log.%i" name="LOGFILE">
			<PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5.5p] [%-36.36c] - %m%n"/>
            <RegexFilter regex=".*(heartBeat|LastUpdate|lastUpdate|LetzteAktualisierung|Uptime|Laufzeit|ZuletztGesehen).*" onMatch="DENY" onMismatch="NEUTRAL"/>
			<Policies>
				<SizeBasedTriggeringPolicy size="16 MB"/>
			</Policies>
		</RollingFile>
...

```

---

_[View the full topic](https://community.openhab.org/t/log-filtering-in-oh-3/110376)._
