File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 6262 'driver ' => 'monolog ' ,
6363 'handler ' => Laracord \Logging \LoggingHandler::class,
6464 'with ' => [
65- 'path ' => laracord_path ('logs/laracord.log ' ),
65+ 'path ' => env ( ' LOG_PATH ' , laracord_path ('logs/laracord.log ' ) ),
6666 'level ' => env ('LOG_LEVEL ' , 'info ' ),
67+ 'maxSize ' => env ('LOG_MAX_SIZE ' , 10 ),
68+ 'maxFiles ' => env ('LOG_MAX_FILES ' , 5 ),
69+ 'flushInterval ' => env ('LOG_FLUSH_INTERVAL ' , 60 ),
6770 ],
6871 ],
6972
Original file line number Diff line number Diff line change @@ -32,14 +32,16 @@ class LoggingHandler extends AbstractProcessingHandler
3232 */
3333 public function __construct (
3434 protected string $ path ,
35- protected int $ maxSize = 10485760 ,
35+ protected int $ maxSize = 10 ,
3636 protected int $ maxFiles = 5 ,
3737 protected float $ flushInterval = 60 ,
3838 mixed $ level = Level::Debug,
3939 bool $ bubble = true ,
4040 ) {
4141 parent ::__construct ($ level , $ bubble );
4242
43+ $ this ->maxSize *= 1024 * 1024 ;
44+
4345 $ this ->initializeStream ();
4446 }
4547
You can’t perform that action at this time.
0 commit comments