Parses log file, applies filters, and sets states for visualization
- Copy contents of „iobroker_logfile-script.js“ into the clipboard.
- Open your ioBroker adminstration page, navigate to the "Scripts" section, add a new JavaScript and paste the contents.
- Change the name of the script e.g. to "Logfile-Script" and save it. Make sure the script is not under the Global folder, that's simply not required and not a good idea at all.
- Modify the settings in the script accordingly
- Save and activate the script.
- ioBroker Forum: Log-Datei aufbereiten für VIS - JavaScript.
- (Mic-M) - Fix: States "...clearDateTime" will not get an initial date value on first script start, also fix for "on({id: ".
- (Mic-M) + Put 0.5.1 BETA into stable
- (Mic-M) + New option L_APPLY_CSS. If true, it will add HTML "span class='log-info'" to each log string. 'log-info' for level info, 'log-error' for error, etc. This makes it easy to format a JSON table text with CSS per log level. In addition to that, new option L_APPLY_CSS_LIMITED_TO_LEVEL to just apply the CSS to the log level text (warn, error, info, etc.).
- (Mic-M) + New States "Clear JSON log ..." and "Clear JSON log - Date/Time ...". See change history in script for details
- (Mic-M) + New parameter 'clean' to remove certain strings from the log line.
- (Mic-M) + New parameter 'columns' for JSON output to specify which columns to be shown, and in which order.
- (Mic-M) + New state "JSONcount" to have the number of log lines in state
- (Mic-M) - Fixed a few issues
- (Mic-M) - Fix: improved validation of log line consistency
- (Mic-M) + Added filtering, blacklist, and several fixes
- (Mic-M) - Fix: corrected wrong function name
- (Mic-M) Initial Release
MIT License
Copyright (c) 2018 Mic-M
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.