Please note: if you have made changes in your app/config/packages/bankdev/logviewer/config.php, DO NOT publish the package config again. It will overwrite yours without any warning.
##Usage and Configuration
By default, LogViewer will register itself a couple of routes:
logviewer -> Redirect to today's log, showing all levels.
logviewer/$app/$sapi/$fileName/delete -> Delete log from $sapi (see: php_sapi_name).
logviewer/$app/$sapi/$fileName/$level? -> Show log from $sapi on $fileName with $level (if not supplied, defaults to all).
LogViewer also registers a couple filters:
logviewer.logs: aggregates all the logs in your configured monitored directories and shares them with the $logs variable.
logviewer.messages: Checks if there are success, error, or info flash messages in the session and sets the $has_messages variable as true or false.
base_url: The URL LogViewer will be available on. You can have this nested (for example: admin/logviewer). Default: logviewer.
filters: Before and After filters to apply to the routes. We define no filters by default, as not everyone uses authentication or the same filter names.
global: Filters that affect the entirety of the logviewer. For example: 'global' => array('before' => 'auth'), will apply the default Laravel auth filter to the logviewer, requiring a logged in user for all routes.
view: Filters that affect the viewing of log files.
delete: Filter that affect the deletion of log files.
log_dirs: Associative array of log directories to monitor. Array keys are the 'names' of your applications, values are the paths to their app/storage/logs dir (no trailing slash). Default: array('app' => storage_path().'/logs').
log_order: Order log contents ascending or descending. Default: 'asc'.
per_page: The number of log messages to show per page via Pagination. Default: 10.
view: The name (and location) of the view used to display logs. For more information, check out the 'Advanced Usage' section for detailed information about the variables passed to this view. Default: 'logviewer::viewer'.
p_view: The pagination view to use. When using Bootstrap 3 as the default for an application, the pagination would be broken within LogViewer. If you create your own view, be sure to change this if you use Bootstrap 3 (or write your own pagination view) Default: 'pagination::slider'.
Don't like the way LogViewer looks? Need to integrate it better with your application's theme? You can do so by creating your own view and changing the configuration option. Here are the variables that are sent to the view:
$has_messages: Boolean. The logviewer.messages filter determines if there are success, error, or info flash messages in the session. Used to hide the flash messages container.
$logs: Array. Aggregated logs, generated by the logviewer.logs filter, from all monitored applications. Grouped by SAPI and application. Structure:
SAPI as key, value is an array with keys:
sapi: Human-readable SAPI.
logs: Application 'short name' as key, value is an array of log dates.
$log: Array. Currently selected log's contents. Each message is split into an array. Structure:
level: String. The level of the log message.
header: String. The first line of the log message.
stack: String. The rest of the log message. Possibly blank, if the message did not contain a stack trace.
$empty: Boolean. Whether the current log is empty or not.
$fileName: String. The FileName of the currently selected log.
$sapi: String. The human-readable SAPI of the currently selected log.
$sapi_plain: String. The SAPI of the currently selected log. Used in the URI.
$url: String. The base URL from configuration.
$levels: Array. All possible log levels, per psr/log.
$path: String. The array key of the currently selected log's application.