Skip to content

Commit a8177a4

Browse files
author
Till Brehm
committed
Improved Log view in Monitor.
1 parent 942a607 commit a8177a4

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

interface/web/monitor/show_log.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,9 @@
127127

128128
$logData = explode("\n", htmlspecialchars($data));
129129
$logDataHtml = '';
130+
130131
/* set css class for each line of log, depending on key words in each line */
131-
foreach($logData as $val) {
132+
foreach($logData as $line => $val) {
132133
if (strpos($val, 'ERROR') !== FALSE) {
133134
$logDataHtml .= "<div class='logerror'>$val</div>";
134135
} elseif (strpos($val, 'WARN') !== FALSE) {
@@ -140,7 +141,7 @@
140141
}
141142
}
142143

143-
$app->tpl->setVar("log_data", $logData);
144+
$app->tpl->setVar("log_data", $logDataHtml);
144145
} else {
145146
$app->tpl->setVar("log_data", $app->lng("no_logdata_txt"));
146147
}

interface/web/monitor/templates/show_log.htm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ <h1><tmpl_var name="list_head_txt"></h1>
1616

1717
<div class="pnl_formarea">
1818
<p class="fieldset-legend"><tmpl_var name="monTransDate"><tmpl_var name="time"></p>
19-
<div class="codeview"><tmpl_var name="log_data"></div>
19+
<div class="codeview"><pre><tmpl_var name="log_data"></pre></div>
2020

2121
</div>

0 commit comments

Comments
 (0)