Log file is not writen any more

I set the events.log and openhab.log to 4. I’ll see what happens. Thanks

That was my syntax and it brakes logging. is that wrong?

As it broke, obviously so.
As the name says already it needs to be XML format .

Hm, according to first post we talk about OH 2.5.X.
As I am on OH 3.4.X I cannot check in my system but according to openhab-distro/distributions/openhab/src/main/resources/userdata/etc/org.ops4j.pax.logging.cfg at 2.5.x · openhab/openhab-distro · GitHub the configuration file format for logging that was used for OH 2.5 is a text file.

log4j2.appender.out.strategy.max = 2
log4j2.appender.event.strategy.max = 2
log4j2.appender.audit.strategy.max = 2

then should be correct.

1 Like

Show the full file and since we are many months from your previous attempt please state/restate which version of OH we are referring to. Between OH 2 and OH 3 there was a move from the properties file to an XML file and the syntax is radically different (and the actual config is in a new file).

Still on OH2.5 on that particular install.
I add one single line as detailed in the post #14

It’s been a very long time since I’ve looked at OH 2.5 (at least two years now) and the logging config was moved to log4j2.xml in OH 3.

That line looks correct as far as I can tell digging through the old log4j2 config docs.

Do you see anything logged to the syslog when you add it? If OH can’t use log4j2 it likely generates logs to standard error which get picked up by syslog assuming a systemd launched OH.

Strange things happening here as well.

Yesterday I stopped openhab service, restarted zram-config.service an started openhab service again. After that I had no openhab logs in /var/log whatsoever. I wouldn’t even have noticed, if it weren’t for the fact that mosquitto.log had also dissapeared, which made mosquitto fail at startup. What’s going on here?

I’m on Openhabian, openHAB 3.4.1 - Release Build at the moment on a Raspberry Pi 4 Model B Rev 1.1 (4G), my setup has been running for months without problems.

Note, if your zram file systems are full and you cycle zram, what happens is zram writes everything to disk and then when it comes back up it loads everything on disk back into the volume. If it was full when you restarted, it will be full when you come back. Make sure to “clean” the log folders before restarting zram.

The amount of space dedicated to the zram partitions is good for an average system. But many users will need to adjust things (e.g. limit persisted Items, reduce the number and/or size of log files, etc.).

Thanks Rich. Is my understanding correct that this is to be done with log:clear in the console?
Furthermore, I now have no openhab log-files anymore, even though openhab is running just fine and log:tail shows all recent log entries. How do i get openhab to start writing these logfiles again?

I’m not sure what that command does, but ultimately what needs to happen is space needs to be opened up on those file systems. You can check after running that command if the log files are deleted.

Fix your logging config. What it takes to do that? :person_shrugging: If OH was running when you cycled zram, it’s probably writing to files on the SD card which are masked by the zram overlay.

Nope, completely gone. OH was not running when cycling zram.
I had to recreate the logfiles by hand witch ‘touch’ to get OH writing in them again. Thanks for the help! :slightly_smiling_face: