FuzeWorks debug log'; $layer = 0; foreach ($logs as $log) { if ($log['type'] == 'LEVEL_START') { ++$layer; $color = 255 - ($layer * 25); $string .= '
'; $string .= '
' . $log['message'] . '' . (!empty($log['runtime']) ? '(' . round($log['runtime'] * 1000, 4) . 'ms)' : '') . '
'; } elseif ($log['type'] == 'LEVEL_STOP') { --$layer; $string .= '
'; } elseif ($log['type'] == 'ERROR') { $string .= '
[' . $log['type'] . ']' . (!empty($log['context']) && is_string($log['context']) ? '[' . $log['context'] . ']' : '') . ' ' . $log['message'] . ' ' . (!empty($log['logFile']) ? $log['logFile'] : '') . ' : ' . (!empty($log['logLine']) ? $log['logLine'] : '') . '(' . round($log['runtime'] * 1000, 4) . ' ms)
'; } elseif ($log['type'] == 'WARNING') { $string .= '
[' . $log['type'] . ']' . (!empty($log['context']) && is_string($log['context']) ? '[' . $log['context'] . ']' : '') . ' ' . $log['message'] . ' ' . (!empty($log['logFile']) ? $log['logFile'] : '') . ' : ' . (!empty($log['logLine']) ? $log['logLine'] : '') . '(' . round($log['runtime'] * 1000, 4) . ' ms)
'; } elseif ($log['type'] == 'INFO') { $string .= '
' . (!empty($log['context']) ? '[' . $log['context'] . ']' : '') . ' ' . $log['message'] . '(' . round($log['runtime'] * 1000, 4) . ' ms)
'; } elseif ($log['type'] == 'DEBUG') { $string .= '
[' . $log['type'] . ']' . (!empty($log['context']) ? '[' . $log['context'] . ']' : '') . ' ' . $log['message'] . '(' . round($log['runtime'] * 1000, 4) . ' ms)
'; } } echo $string;