mirror of
https://github.com/archtechx/tenancy.git
synced 2026-05-06 21:04:06 +00:00
Correct log file cleanup
This commit is contained in:
parent
f705f5849f
commit
697ba6592b
1 changed files with 12 additions and 6 deletions
|
|
@ -20,9 +20,12 @@ beforeEach(function () {
|
|||
],
|
||||
]);
|
||||
|
||||
@unlink(storage_path('logs/laravel.log'));
|
||||
@unlink(storage_path('logs/laravel-' . now()->format('Y-m-d') . '.log'));
|
||||
foreach (glob(storage_path('tenant*/logs/*.log')) ?: [] as $path) {
|
||||
$logFiles = array_merge(
|
||||
glob(storage_path('logs/*.log')) ?: [],
|
||||
glob(storage_path('tenant*/logs/*.log')) ?: []
|
||||
);
|
||||
|
||||
foreach ($logFiles as $path) {
|
||||
@unlink($path);
|
||||
}
|
||||
|
||||
|
|
@ -38,9 +41,12 @@ afterEach(function () {
|
|||
LogTenancyBootstrapper::$channelOverrides = [];
|
||||
LogTenancyBootstrapper::$storagePathChannels = ['single', 'daily'];
|
||||
|
||||
@unlink(storage_path('logs/laravel.log'));
|
||||
@unlink(storage_path('logs/laravel-' . now()->format('Y-m-d') . '.log'));
|
||||
foreach (glob(storage_path('tenant*/logs/*.log')) ?: [] as $path) {
|
||||
$logFiles = array_merge(
|
||||
glob(storage_path('logs/*.log')) ?: [],
|
||||
glob(storage_path('tenant*/logs/*.log')) ?: []
|
||||
);
|
||||
|
||||
foreach ($logFiles as $path) {
|
||||
@unlink($path);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue