diff --git a/interface/web/monitor/show_log.php b/interface/web/monitor/show_log.php index e8f3acc735eae75e1d1bda8d243ae114e4f3cf55..4889e83dd914ae42168bb211e4c217fc3955cc96 100644 --- a/interface/web/monitor/show_log.php +++ b/interface/web/monitor/show_log.php @@ -127,8 +127,9 @@ if(isset($record['data'])) { $logData = explode("\n", htmlspecialchars($data)); $logDataHtml = ''; + /* 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) { $logDataHtml .= "<div class='logerror'>$val</div>"; } elseif (strpos($val, 'WARN') !== FALSE) { @@ -140,7 +141,7 @@ if(isset($record['data'])) { } } - $app->tpl->setVar("log_data", $logData); + $app->tpl->setVar("log_data", $logDataHtml); } else { $app->tpl->setVar("log_data", $app->lng("no_logdata_txt")); } diff --git a/interface/web/monitor/templates/show_log.htm b/interface/web/monitor/templates/show_log.htm index 800bfa3ece485912b45d8484dfc8785c62045a6d..959f324d7f09b49142738de3d40efe5f3f737631 100644 --- a/interface/web/monitor/templates/show_log.htm +++ b/interface/web/monitor/templates/show_log.htm @@ -16,6 +16,6 @@ <div class="pnl_formarea"> <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> \ No newline at end of file