-
-
Notifications
You must be signed in to change notification settings - Fork 121
/
laravel-logger.php
179 lines (143 loc) · 8.29 KB
/
laravel-logger.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<?php
return [
/*
|--------------------------------------------------------------------------
| Laravel Logger Database Settings
|--------------------------------------------------------------------------
*/
'loggerDatabaseConnection' => env('LARAVEL_LOGGER_DATABASE_CONNECTION', env('DB_CONNECTION', 'mysql')),
'loggerDatabaseTable' => env('LARAVEL_LOGGER_DATABASE_TABLE', 'laravel_logger_activity'),
/*
|--------------------------------------------------------------------------
| Laravel Logger Roles Settings - (laravel roles not required if false)
|--------------------------------------------------------------------------
*/
'rolesEnabled' => env('LARAVEL_LOGGER_ROLES_ENABLED', false),
'rolesMiddlware' => env('LARAVEL_LOGGER_ROLES_MIDDLWARE', 'role:admin'),
/*
|--------------------------------------------------------------------------
| Enable/Disable Laravel Logger Middlware
|--------------------------------------------------------------------------
*/
'loggerMiddlewareEnabled' => env('LARAVEL_LOGGER_MIDDLEWARE_ENABLED', true),
'loggerMiddlewareExcept' => array_filter(explode(',', trim((string) env('LARAVEL_LOGGER_MIDDLEWARE_EXCEPT') ?? ''))),
/*
|--------------------------------------------------------------------------
| Laravel Logger Authentication Listeners Enable/Disable
|--------------------------------------------------------------------------
*/
'logAllAuthEvents' => false, // May cause a lot of duplication.
'logAuthAttempts' => false, // Successful and Failed - May cause a lot of duplication.
'logFailedAuthAttempts' => true, // Failed Logins
'logLockOut' => true, // Account Lockout
'logPasswordReset' => true, // Password Resets
'logSuccessfulLogin' => true, // Successful Login
'logSuccessfulLogout' => true, // Successful Logout
/*
|--------------------------------------------------------------------------
| Laravel Logger Search Enable/Disable
|--------------------------------------------------------------------------
*/
'enableSearch' => env('LARAVEL_LOGGER_ENABLE_SEARCH', 'false'),
/*
|--------------------------------------------------------------------------
| Laravel Logger Search Parameters
|--------------------------------------------------------------------------
*/
// you can add or remove from these options [description,user,method,route,ip]
'searchFields' => env('LARAVEL_LOGGER_SEARCH_FIELDS', 'description,user,method,route,ip'),
/*
|--------------------------------------------------------------------------
| Laravel Default Models
|--------------------------------------------------------------------------
*/
'defaultActivityModel' => env('LARAVEL_LOGGER_ACTIVITY_MODEL', 'jeremykenedy\LaravelLogger\App\Models\Activity'),
'defaultUserModel' => env('LARAVEL_LOGGER_USER_MODEL', 'App\User'),
/*
|--------------------------------------------------------------------------
| Laravel Default User ID Field
|--------------------------------------------------------------------------
*/
'defaultUserIDField' => env('LARAVEL_LOGGER_USER_ID_FIELD', 'id'),
/*
|--------------------------------------------------------------------------
| Disable automatic Laravel Logger routes
| If you want to customise the routes the package uses, set this to true.
| For more information, see the README.
|--------------------------------------------------------------------------
*/
'disableRoutes' => env('LARAVEL_LOGGER_DISABLE_ROUTES', false),
/*
|--------------------------------------------------------------------------
| Laravel Logger Pagination Settings
|--------------------------------------------------------------------------
*/
'loggerPaginationEnabled' => env('LARAVEL_LOGGER_PAGINATION_ENABLED', true),
'loggerCursorPaginationEnabled' => env('LARAVEL_LOGGER_CURSOR_PAGINATION_ENABLED', false),
'loggerPaginationPerPage' => env('LARAVEL_LOGGER_PAGINATION_PER_PAGE', 25),
/*
|--------------------------------------------------------------------------
| Laravel Logger Databales Settings - Not recommended with pagination.
|--------------------------------------------------------------------------
*/
'loggerDatatables' => env('LARAVEL_LOGGER_DATATABLES_ENABLED', false),
'loggerDatatablesCSScdn' => 'https://cdn.datatables.net/1.10.12/css/dataTables.bootstrap.min.css',
'loggerDatatablesJScdn' => 'https://cdn.datatables.net/1.10.12/js/jquery.dataTables.min.js',
'loggerDatatablesJSVendorCdn' => 'https://cdn.datatables.net/1.10.15/js/dataTables.bootstrap.min.js',
/*
|--------------------------------------------------------------------------
| Laravel Logger Dashboard Settings
|--------------------------------------------------------------------------
*/
'enableSubMenu' => env('LARAVEL_LOGGER_DASHBOARD_MENU_ENABLED', true),
'enableDrillDown' => env('LARAVEL_LOGGER_DASHBOARD_DRILLABLE', true),
/*
|--------------------------------------------------------------------------
| Laravel Logger Failed to Log Settings
|--------------------------------------------------------------------------
*/
'logDBActivityLogFailuresToFile' => env('LARAVEL_LOGGER_LOG_RECORD_FAILURES_TO_FILE', true),
/*
|--------------------------------------------------------------------------
| Laravel Logger Flash Messages
|--------------------------------------------------------------------------
*/
'enablePackageFlashMessageBlade' => env('LARAVEL_LOGGER_FLASH_MESSAGE_BLADE_ENABLED', true),
/*
|--------------------------------------------------------------------------
| Blade settings
|--------------------------------------------------------------------------
*/
// The parent Blade file
'loggerBladeExtended' => env('LARAVEL_LOGGER_LAYOUT', 'layouts.app'),
// Switch Between bootstrap 3 `panel` and bootstrap 4 `card` classes
'bootstapVersion' => env('LARAVEL_LOGGER_BOOTSTRAP_VERSION', '4'),
// Additional Card classes for styling -
// See: https://getbootstrap.com/docs/4.0/components/card/#background-and-color
// Example classes: 'text-white bg-primary mb-3'
'bootstrapCardClasses' => '',
// Blade Extension Placement
'bladePlacement' => env('LARAVEL_LOGGER_BLADE_PLACEMENT', 'yield'),
'bladePlacementCss' => env('LARAVEL_LOGGER_BLADE_PLACEMENT_CSS', 'template_linked_css'),
'bladePlacementJs' => env('LARAVEL_LOGGER_BLADE_PLACEMENT_JS', 'footer_scripts'),
/*
|--------------------------------------------------------------------------
| Laravel Logger Dependencies - allows for easier builds into other projects
|--------------------------------------------------------------------------
*/
// jQuery
'enablejQueryCDN' => env('LARAVEL_LOGGER_JQUERY_CDN_ENABLED', true),
'JQueryCDN' => env('LARAVEL_LOGGER_JQUERY_CDN_URL', 'https://code.jquery.com/jquery-3.2.1.slim.min.js'),
// Bootstrap
'enableBootstrapCssCDN' => env('LARAVEL_LOGGER_BOOTSTRAP_CSS_CDN_ENABLED', true),
'bootstrapCssCDN' => env('LARAVEL_LOGGER_BOOTSTRAP_CSS_CDN_URL', 'https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css'),
'enableBootstrapJsCDN' => env('LARAVEL_LOGGER_BOOTSTRAP_JS_CDN_ENABLED', true),
'bootstrapJsCDN' => env('LARAVEL_LOGGER_BOOTSTRAP_JS_CDN_URL', 'https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js'),
'enablePopperJsCDN' => env('LARAVEL_LOGGER_POPPER_JS_CDN_ENABLED', true),
'popperJsCDN' => env('LARAVEL_LOGGER_POPPER_JS_CDN_URL', 'https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js'),
// Font Awesome
'enableFontAwesomeCDN' => env('LARAVEL_LOGGER_FONT_AWESOME_CDN_ENABLED', true),
'fontAwesomeCDN' => env('LARAVEL_LOGGER_FONT_AWESOME_CDN_URL', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css'),
// LiveSearch for scalability
'enableLiveSearch' => env('LARAVEL_LOGGER_LIVE_SEARCH_ENABLED', true),
];