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
20
20
}
21
21
22
22
$ 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/ ' );
24
24
25
25
if ($ isOpenListen ) {
26
26
$ traceId = $ _REQUEST ['trace_id ' ] ?? uniqid (bin2hex (random_bytes (10 )),true );
@@ -51,7 +51,7 @@ public function boot(): void
51
51
unset($ dbConf ['password ' ]);
52
52
}
53
53
54
- $ logPath = $ sqlLogPath . '.sql_trace. ' . now ()->toDateString () . '.log ' ;
54
+ $ logPath = $ sqlLogPath . 'sql-trace- ' . now ()->toDateString () . '.log ' ;
55
55
56
56
file_put_contents ($ logPath ,json_encode ([
57
57
'level ' => $ this ->getSqlLevelByExecTime ($ sql ->time ),
@@ -79,7 +79,7 @@ public function boot(): void
79
79
*/
80
80
public function register (): void
81
81
{
82
- $ this ->mergeConfigFrom (__DIR__ .'/../config/sql_trace.php ' , 'sqlTrace ' );
82
+ $ this ->mergeConfigFrom (__DIR__ .'/../config/sql_trace.php ' , 'sql_trace ' );
83
83
}
84
84
85
85
/**
You can’t perform that action at this time.
0 commit comments