Including and excluding log files
Before you're able to configure this, make sure to first publish the configuration file.
Log Viewer includes all Laravel logs inside storage/logs
folder by default. Often times you may have other logs in other places, or you might want to hide certain logs from Log Viewer. This can be configured inside config/log-viewer.php
.
Keep in mind, Log Viewer only supports a limited number of log types at the moment.
Including file paths for unsupported log files may display them as empty in the Log Viewer.
Including additional log files
You can include additional log files inside Log Viewer by adding glob patterns to the 'include_files'
attribute:
/* |-------------------------------------------------------------------------- | Include file patterns |-------------------------------------------------------------------------- | */ 'include_files' => [ '*.log', '**/*.log', // '/absolute/paths/supported', ],
Excluding log files
You can hide certain files from Log Viewer by providing glob patterns to the 'exclude_files'
attribute:
/* |-------------------------------------------------------------------------- | Exclude file patterns. |-------------------------------------------------------------------------- | This will take precedence over included files. | */ 'exclude_files' => [ // 'my_secret.log' ],
Hiding/showing unknown log files
Since v3, by default Log Viewer will hide any unknown files from the UI that it doesn't support. You can disable this behaviour by setting the 'hide_unknown_files'
option in config/log-viewer.php
:
/* |-------------------------------------------------------------------------- | Hide unknown files. |-------------------------------------------------------------------------- | The include/exclude options above might catch files which are not | logs supported by Log Viewer. In that case, you can hide them | from the UI and API calls by setting this to true. | */ 'hide_unknown_files' => false,