Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use RollingRandomAccessFile appender with openhab.log #1656

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wborn
Copy link
Member

@wborn wborn commented May 15, 2024

Closes #1654

Closes openhab#1654

Signed-off-by: Wouter Born <github@maindrain.net>
@wborn wborn requested a review from a team as a code owner May 15, 2024 11:00
@wborn wborn added the bug An unexpected problem or unintended behavior label May 15, 2024
@holgerfriedrich
Copy link
Member

holgerfriedrich commented May 15, 2024

Change to RollingRandomAccessFile does no harm on my system.

I wanted to try if it really fixes the issue by triggering the zram sync.
You need a very recent openhabian (latest) to get the zsync service installed with zram option.

systemctl start zsync succeeds, but for me the log does not recover (both openhab.log and events.log are affected, openhab-cli console shows new log entries which are not seen in the logs).

@mstormi
Copy link
Contributor

mstormi commented May 15, 2024

I had this on very first attempt, too, but after OH restart it's fine now

@holgerfriedrich
Copy link
Member

Not sure. I tried restarting OH, even clearing the cache, and finally reboot as well. Works until I trigger the sync, from then nothing is logged.

After a few hours there seem to be new log entries, but there is a gap. Maybe we need to lower the cache size...?!

@mstormi
Copy link
Contributor

mstormi commented May 16, 2024

After a few hours there seem to be new log entries, but there is a gap. Maybe we need to lower the cache size...?!

What do you mean by "gap". Are there messages missing or do you actually mean "delay" ?
I wouldn't know how to reduce that. If I understood that stackoverflow comment correctly cache size is 256K fixed and not configurable anyway.
Try producing extra log lines by increasing log level for a test.

@mstormi
Copy link
Contributor

mstormi commented May 24, 2024

Testing shows the change doesn't fix the issue.
I'm still seeing it every day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Logging stops when logfile goes away on zram sync
3 participants