Closed allinappliadmin closed 1 month ago
That sounds like a good idea. I'm curious whether the log file is now well-formed enough that we can do that reliably, but it certainly looks like it from a few samples. Did you want to put together some code, or were you hoping someone else was going to add the feature?
I was more hoping that someone handles that. how long would that take to get it done?
Well, this is (unfunded) open source, so the only reliable answer is "it depends".
The good news is that it sounds like a fairly straightforward improvement and that others might benefit and appreciate it.
this is already a good news
The last commit enables filtering:
This is done by changing the Page to Form (i.e. CRM/Logviewer/Page/LogViewer.php -> CRM/Logviewer/Form/LogViewer.php).
I split up the former run() function into buildQuickForm() and postProcess(). To filter by log level I parse the message ('[error]', '[debug'], ...), split the log level and add a new column .
Also:
Todo: I did not managed to show a reset button:
$this->addButtons([
[
'type' => 'submit',
'name' => E::ts('Filter'),
'isDefault' => TRUE,
],
['type' => 'reset', 'name' => E::ts('Reset')],
]);
only shows the button 'Filter' but 'Reset' is not visible in the UI. Any ideas hot to add a reset button?
Resolved with https://github.com/adixon/ca.civicrm.logviewer/pull/31
Would it be possible to add filter like in the web browser console to choose between
error
warning
ìnfo`debug
...? This would help solving issues