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
30
30
intro ('Generating Debug Information... ' );
31
31
32
32
$ this ->processEnvironment ()
33
- ->processNativePHP ()
34
- ->processErrorLog ();
33
+ ->processNativePHP ();
35
34
36
35
switch ($ this ->argument ('output ' )) {
37
36
case 'File ' :
@@ -126,43 +125,6 @@ private function processNativePHP(): static
126
125
return $ this ;
127
126
}
128
127
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
-
166
128
protected function promptForMissingArgumentsUsing (): array
167
129
{
168
130
return [
You can’t perform that action at this time.
0 commit comments