Update logger to provide history and improve performance #4570
+237
−41
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Improve performance of logging and support reading history
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