v1.4.0#117
Merged
Merged
Conversation
Introduce a log filters feature to allow pattern-based remapping or dropping of daemon log records. - UI: add a modal (desktop/modal/logfilters.tvremote.php) and JS (desktop/js/logfilters.tvremote.js) to manage filters (enable/disable, pattern, target level). Add a button and checkbox in plugin configuration to open the manager and enable filters. - Backend PHP: add AJAX handler (saveLogFilters) in core/ajax/tvremote.ajax.php and file helpers in core/class/tvremote.class.php (create/get/save logfilters.json). Install/update now initializes config key and ensures the filters file exists. - Daemon/Python: extend config to include log filters settings and file path (resources/tvremoted/config.py), add a PatternRemapFilter to remap/drop log records and wire it into logging when enabled (resources/tvremoted/tvremoted.py). Add command-line arg propagation from PHP when starting the daemon. - Other: bump pluginVersion to 1.4.0, add data/filters/README.md and ignore data/filters/*.json in .gitignore, update .vscode/settings.json. Notes: logfilters.json is stored in data/filters/ and is gitignored; enabling filters requires restarting the daemon.
Add an info log entry that reports whether log filters are enabled and the number of configured filter rules during daemon startup. This makes it easier to debug and verify the daemon's logging/filter configuration at launch.
Update the success alert in desktop/js/logfilters.tvremote.js (window.initLogFilters) to inform the user that they must restart the daemon for saved log filter changes to take effect. This clarifies required follow-up action after saving filters.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull request introduces a new feature for customizable log filtering in the TV Remote plugin, allowing users to define patterns and target log levels for specific log messages. The implementation includes both backend and frontend components, as well as configuration and persistence of filter rules. The main changes are grouped below:
Log Filters Feature Implementation
PatternRemapFilterclass and integrated into the daemon startup logic. (resources/tvremoted/tvremoted.py[1] [2];resources/tvremoted/config.py[3] [4]data/filters/logfilters.json. (core/class/tvremote.class.phpcore/class/tvremote.class.phpR563-R584)core/ajax/tvremote.ajax.phpcore/ajax/tvremote.ajax.phpR68-R77)User Interface Enhancements
desktop/modal/logfilters.tvremote.php[1];desktop/js/logfilters.tvremote.js[2]plugin_info/configuration.php[1] [2]Configuration and Persistence
plugin_info/install.php[1] [2].vscode/settings.jsonand added documentation for the filters directory. (.vscode/settings.json[1];data/filters/README.md[2]Miscellaneous
1.4.0to reflect the new feature. (plugin_info/info.jsonplugin_info/info.jsonL4-R4)These changes collectively provide a flexible mechanism for users to control log verbosity and filter unwanted log messages based on custom rules, improving the usability and maintainability of the plugin's logging system.