friendica/view/js/module/admin/logs/view.js
fabrixxm 9368f5445d 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.
2021-08-19 14:55:33 +02:00

8 lines
150 B
JavaScript

function log_show_details(id) {
document
.querySelectorAll('[data-id="' + id + '"]')
.forEach(elm => {
elm.classList.toggle('hidden')
});
}