Display structured logs in admin
Tries to parse log lines and to display info in a table. Additional JSON data is parsed and displayed clicking on a row. File reading and line parsing is handled in iterators, to avoid to keep too much data in memory. Search and filter should be trivial to add. Log file is read backward to display log events newest first. A "tail" functionality should be easy to implement.
This commit is contained in:
7
view/js/module/admin/logs/view.js
Normal file
7
view/js/module/admin/logs/view.js
Normal file
@@ -0,0 +1,7 @@
|
||||
function log_show_details(id) {
|
||||
document
|
||||
.querySelectorAll('[data-id="' + id + '"]')
|
||||
.forEach(elm => {
|
||||
elm.classList.toggle('hidden')
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user