File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ public function boot(): void
2020 }
2121
2222 $ isOpenListen = config ('sql_trace.open_listen_sql ' );
23- $ sqlLogPath = config ('sql_trace.sql_log_path ' , storage_path ('/logs/ ' ) );
23+ $ sqlLogPath = config ('sql_trace.sql_log_path ' ) ?: storage_path ('/logs/ ' );
2424
2525 if ($ isOpenListen ) {
2626 $ traceId = $ _REQUEST ['trace_id ' ] ?? uniqid (bin2hex (random_bytes (10 )),true );
@@ -51,7 +51,7 @@ public function boot(): void
5151 unset($ dbConf ['password ' ]);
5252 }
5353
54- $ logPath = $ sqlLogPath . '.sql_trace. ' . now ()->toDateString () . '.log ' ;
54+ $ logPath = $ sqlLogPath . 'sql-trace- ' . now ()->toDateString () . '.log ' ;
5555
5656 file_put_contents ($ logPath ,json_encode ([
5757 'level ' => $ this ->getSqlLevelByExecTime ($ sql ->time ),
@@ -79,7 +79,7 @@ public function boot(): void
7979 */
8080 public function register (): void
8181 {
82- $ this ->mergeConfigFrom (__DIR__ .'/../config/sql_trace.php ' , 'sqlTrace ' );
82+ $ this ->mergeConfigFrom (__DIR__ .'/../config/sql_trace.php ' , 'sql_trace ' );
8383 }
8484
8585 /**
You can’t perform that action at this time.
0 commit comments