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

Update logger to provide history and improve performance #4570

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

Conversation

cdjackson
Copy link
Contributor

Improve performance of logging and support reading history

  • Reads the history so that the UI can populate logs on startup
  • Manages high rate logging by sending logs in an array

Description

This supports sending of history, and provides a method of managing message cadence.

When a client connects, it must send a filter request before the server will send any logs. This triggers the sending of history.

Live logs are sent as individual messages if they are received with sufficient spacing. When logs come in very quickly, they are clustered together and sent as an array after (up to) 100mS. With these changes I can view full zigbee debug logging which results in over 100 logs per second. The UI retains full responsiveness at this logging rate.

In principle the history size is configured in the org.apache.felix.log.maxSize property, but so far I've been unable to change this from the default of 100 entries.

See also openhab/openhab-webui#3030 which provides updates to the UI

Signed-off-by: Chris Jackson <chris@cd-jackson.com>
@cdjackson cdjackson requested a review from a team as a code owner January 20, 2025 09:34
@cdjackson
Copy link
Contributor Author

looks like this cherry pick from the 4.3 branch (which I'm developing against so I can test it in my production system) didn't come across cleanly. I'll take a look at this tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant