assigned_variables['Logs'] as $log) { $id++; $string = ''; if ($log['type'] == 'WARNING') { $string .= getColoredString('[WARNING]', 'black', 'yellow') . ' - '; $string .= getColoredString($log['message'], 'black', 'yellow'); } elseif ($log['type'] == 'ERROR') { $string .= getColoredString('[ERROR]', 'black', 'red') . ' - '; $string .= getColoredString($log['message'], 'black', 'red'); } elseif ($log['type'] == "LEVEL_STOP") { continue; } else { $string .= getColoredString($log['message'], 'green', 'black'); } printf($mask, $id, $string, (!empty($log['runtime']) ? round($log['runtime'] * 1000, 4) . 'ms' : '')); }