mirror of
https://github.com/unraid/webgui.git
synced 2026-01-24 18:49:17 -06:00
Added color coding in log files
This commit is contained in:
@@ -27,11 +27,9 @@ $cmd = popen(implode(' ',array_map('escapeshellarg',$argv)),'r');
|
||||
foreach ($color as $cat => $val) echo $val,$cat,$last," "; echo "\n\n";
|
||||
while (($line = fgets($cmd))!==false) {
|
||||
$lead = $last;
|
||||
foreach ($match as $type) foreach ($type['text'] as $text) {
|
||||
if (preg_match("/$text/i",$line)) {
|
||||
$lead = $color[$type['class']];
|
||||
break 2;
|
||||
}
|
||||
foreach ($match as $type) foreach ($type['text'] as $text) if (preg_match("/$text/i",$line)) {
|
||||
$lead = $color[$type['class']];
|
||||
break 2;
|
||||
}
|
||||
echo $lead,rtrim($line,"\n"),$last,"\n";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user