File tree Expand file tree Collapse file tree 2 files changed +13
-11
lines changed
Rap2hpoutre/LaravelLogViewer Expand file tree Collapse file tree 2 files changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -150,7 +150,8 @@ public function all()
150150 $ this ->file = $ log_file [0 ];
151151 }
152152
153- if (app ('files ' )->size ($ this ->file ) > self ::MAX_FILE_SIZE ) {
153+ $ max_file_size = function_exists ('config ' ) ? config ('logviewer.max_file_size ' , self ::MAX_FILE_SIZE ) : self ::MAX_FILE_SIZE ;
154+ if (app ('files ' )->size ($ this ->file ) > $ max_file_size ) {
154155 return null ;
155156 }
156157
Original file line number Diff line number Diff line change 11<?php
22
33return [
4- /*
5- |--------------------------------------------------------------------------
6- | Pattern and storage path settings
7- |--------------------------------------------------------------------------
8- |
9- | The env key for pattern and storage path with a default value
10- |
11- */
12- 'pattern ' => env ('LOGVIEWER_PATTERN ' , '*.log ' ),
13- 'storage_path ' => env ('LOGVIEWER_STORAGE_PATH ' , storage_path ('logs ' )),
4+ /*
5+ |--------------------------------------------------------------------------
6+ | Pattern and storage path settings
7+ |--------------------------------------------------------------------------
8+ |
9+ | The env key for pattern and storage path with a default value
10+ |
11+ */
12+ 'max_file_size ' => 52428800 , // size in Byte
13+ 'pattern ' => env ('LOGVIEWER_PATTERN ' , '*.log ' ),
14+ 'storage_path ' => env ('LOGVIEWER_STORAGE_PATH ' , storage_path ('logs ' )),
1415];
You can’t perform that action at this time.
0 commit comments