$v) { if (strstr($v, $file[2])) { $content .= file_get_contents($path . $v); } } } if ($content) { return explode("\n", $content); } return array(); } public static function filter($string) { if (is_array($string)) { $string = json_encode($string); } return $string; } private static function file($level, $day, $hour = '') { if ($level == 1) { $file = 'debug'; } elseif ($level == 2) { $file = 'notice'; } elseif ($level == 3) { $file = 'info'; } else { $file = $level; } if ($hour) { $file .= '_' . $hour; } return File::get('logs/' . $day . DIRECTORY_SEPARATOR . $file); } }