File tree Expand file tree Collapse file tree 1 file changed +1
-39
lines changed Expand file tree Collapse file tree 1 file changed +1
-39
lines changed Original file line number Diff line number Diff line change @@ -30,8 +30,7 @@ public function handle(): void
3030 intro ('Generating Debug Information... ' );
3131
3232 $ this ->processEnvironment ()
33- ->processNativePHP ()
34- ->processErrorLog ();
33+ ->processNativePHP ();
3534
3635 switch ($ this ->argument ('output ' )) {
3736 case 'File ' :
@@ -126,43 +125,6 @@ private function processNativePHP(): static
126125 return $ this ;
127126 }
128127
129- private function processErrorLog (): void
130- {
131- info ('Processing Error Log Data... ' );
132- $ errorLog = file_exists ($ logPath = storage_path ('logs/laravel.log ' ))
133- ? file_get_contents ($ logPath )
134- : 'No logs found. ' ;
135-
136- // Process each line as a single array element
137- $ errorLog = explode (PHP_EOL , $ errorLog );
138- $ errorCount = 0 ;
139- $ errors = [];
140-
141- $ currentLine = '' ;
142- foreach ($ errorLog as $ line ) {
143- if ($ errorCount === 5 ) {
144- break ;
145- }
146-
147- // Check if string starts with date format Y-m-d H:i:s in square brackets
148- if (preg_match ('/^\[\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\]/ ' , $ line )) {
149- if (! empty ($ currentLine )) {
150- $ errors [] = $ currentLine ;
151- $ currentLine = '' ;
152- $ errorCount ++;
153- }
154- }
155-
156- $ currentLine .= $ line .PHP_EOL ;
157- }
158-
159- if (! empty ($ currentLine )) {
160- $ errors [] = $ currentLine ;
161- }
162-
163- $ this ->debugInfo ->put ('ErrorLog ' , $ errors );
164- }
165-
166128 protected function promptForMissingArgumentsUsing (): array
167129 {
168130 return [
You can’t perform that action at this time.
0 commit comments