Remove event.log but keep status updates

Hi,

This is a strange one. A while ago I was messing with the logback.xml file and I managed to configure it in a unique way but not I’ve lost the settings and can’t recreate it.

Basically I managed to remove the event.log logging (which is what I want) but when you run this command

sudo service openhab status 

on Jessie Lite on a RPi you got a list of the latest events (which is what I want).

This was a great work around as I don’t need the on going event.log but I do occasionally want to log in a see the status of the current events, mainly for debugging.

Can anyone think how that can be set up? Is it something to do with

/etc/init.d/openhab

Many thanks!

Here are the events.log sections from my old logback.xml file.

        <appender name="EVENTFILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
                <file>${openhab.logdir:-logs}/events.log</file>
                <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
                        <!-- weekly rollover and archiving -->
                        <fileNamePattern>${openhab.logdir:-logs}/events-%d{yyyy-ww}.log.zip</fileNamePattern>
                        <!-- maximum number of archive files to keep -->
                        <maxHistory>30</maxHistory>
                </rollingPolicy>
                <encoder>
                        <pattern>%d{yyyy-MM-dd HH:mm:ss} - %msg%n</pattern>
                </encoder>
        </appender>

        <logger name="runtime.busevents" level="ERROR" additivity="false">
                <appender-ref ref="EVENTFILE" />
                <appender-ref ref="STDOUT" />
        </logger>

Thanks Rich,

I can see what you’ve done. Change the logging level to ERROR not INFO. Helpful thanks!

However this doesn’t allow me access to the current event bus status.

Is there a way to view the current values without logging events.log?

T

You can configure MQTT with Event Bus which will have it publish everything that goes to the event bus to MQTT topics. Beyond that you have to log.

And I’ll note that those statements that you see when you run service openhab status are in fact coming from the logger.