Skip to content
Snippets Groups Projects
Commit a8177a49 authored by Till Brehm's avatar Till Brehm
Browse files

Improved Log view in Monitor.

parent 942a6075
No related branches found
No related tags found
No related merge requests found
...@@ -127,8 +127,9 @@ if(isset($record['data'])) { ...@@ -127,8 +127,9 @@ if(isset($record['data'])) {
$logData = explode("\n", htmlspecialchars($data)); $logData = explode("\n", htmlspecialchars($data));
$logDataHtml = ''; $logDataHtml = '';
/* set css class for each line of log, depending on key words in each line */ /* set css class for each line of log, depending on key words in each line */
foreach($logData as $val) { foreach($logData as $line => $val) {
if (strpos($val, 'ERROR') !== FALSE) { if (strpos($val, 'ERROR') !== FALSE) {
$logDataHtml .= "<div class='logerror'>$val</div>"; $logDataHtml .= "<div class='logerror'>$val</div>";
} elseif (strpos($val, 'WARN') !== FALSE) { } elseif (strpos($val, 'WARN') !== FALSE) {
...@@ -140,7 +141,7 @@ if(isset($record['data'])) { ...@@ -140,7 +141,7 @@ if(isset($record['data'])) {
} }
} }
$app->tpl->setVar("log_data", $logData); $app->tpl->setVar("log_data", $logDataHtml);
} else { } else {
$app->tpl->setVar("log_data", $app->lng("no_logdata_txt")); $app->tpl->setVar("log_data", $app->lng("no_logdata_txt"));
} }
......
...@@ -16,6 +16,6 @@ ...@@ -16,6 +16,6 @@
<div class="pnl_formarea"> <div class="pnl_formarea">
<p class="fieldset-legend"><tmpl_var name="monTransDate"><tmpl_var name="time"></p> <p class="fieldset-legend"><tmpl_var name="monTransDate"><tmpl_var name="time"></p>
<div class="codeview"><tmpl_var name="log_data"></div> <div class="codeview"><pre><tmpl_var name="log_data"></pre></div>
</div> </div>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment