|
1 | 1 | <?php |
2 | 2 |
|
3 | | -use Opcodes\LogViewer\Level; |
4 | | - |
5 | 3 | return [ |
6 | 4 |
|
7 | 5 | /* |
|
134 | 132 | 'include_files' => [ |
135 | 133 | '*.log', |
136 | 134 | '**/*.log', |
| 135 | + |
| 136 | + // You can include paths to other log types as well, such as apache, nginx, and more. |
| 137 | + '/var/log/httpd/*', |
| 138 | + '/var/log/nginx/*', |
| 139 | + |
| 140 | + // MacOS Apple Silicon logs |
| 141 | + '/opt/homebrew/var/log/nginx/*', |
| 142 | + '/opt/homebrew/var/log/httpd/*', |
| 143 | + '/opt/homebrew/var/log/php-fpm.log', |
| 144 | + '/opt/homebrew/var/log/postgres*log', |
| 145 | + '/opt/homebrew/var/log/redis*log', |
| 146 | + '/opt/homebrew/var/log/supervisor*log', |
| 147 | + |
137 | 148 | // '/absolute/paths/supported', |
138 | 149 | ], |
139 | 150 |
|
|
164 | 175 | '/vendor/barryvdh/laravel-debugbar/', |
165 | 176 | ], |
166 | 177 |
|
167 | | - /* |
168 | | - |-------------------------------------------------------------------------- |
169 | | - | Log matching patterns |
170 | | - |-------------------------------------------------------------------------- |
171 | | - | Regexes for matching log files |
172 | | - | |
173 | | - */ |
174 | | - |
175 | | - 'patterns' => [ |
176 | | - 'laravel' => [ |
177 | | - 'log_matching_regex' => '/^\[(\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}:\d{2}\.?(\d{6}([\+-]\d\d:\d\d)?)?)\].*/', |
178 | | - |
179 | | - /** |
180 | | - * This pattern, used for processing Laravel logs, returns these results: |
181 | | - * $matches[0] - the full log line being tested. |
182 | | - * $matches[1] - full timestamp between the square brackets (includes microseconds and timezone offset) |
183 | | - * $matches[2] - timestamp microseconds, if available |
184 | | - * $matches[3] - timestamp timezone offset, if available |
185 | | - * $matches[4] - contents between timestamp and the severity level |
186 | | - * $matches[5] - environment (local, production, etc) |
187 | | - * $matches[6] - log severity (info, debug, error, etc) |
188 | | - * $matches[7] - the log text, the rest of the text. |
189 | | - */ |
190 | | - 'log_parsing_regex' => '/^\[(\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}:\d{2}\.?(\d{6}([\+-]\d\d:\d\d)?)?)\](.*?(\w+)\.|.*?)(' |
191 | | - .implode('|', array_filter(Level::caseValues())) |
192 | | - .')?: (.*?)( in [\/].*?:[0-9]+)?$/is', |
193 | | - ], |
194 | | - ], |
195 | | - |
196 | 178 | /* |
197 | 179 | |-------------------------------------------------------------------------- |
198 | 180 | | Cache driver |
|
0 commit comments