diff --git a/config/logging.php b/config/logging.php index d4ec598f1..17112ebf3 100644 --- a/config/logging.php +++ b/config/logging.php @@ -144,6 +144,15 @@ return [ 'permission' => 0775, 'locking' => false, ], + 'nfo_import' => [ + 'driver' => 'daily', + 'path' => storage_path('logs/nfo_import.log'), + 'level' => 'debug', + 'days' => 7, + 'bubble' => true, + 'permission' => 0775, + 'locking' => false, + ], 'nzb_creation' => [ 'driver' => 'daily', 'path' => storage_path('logs/nzb_creation.log'), diff --git a/tests/Unit/NfoImportServiceTest.php b/tests/Unit/NfoImportServiceTest.php index 8699e7eee..5454bcfd2 100644 --- a/tests/Unit/NfoImportServiceTest.php +++ b/tests/Unit/NfoImportServiceTest.php @@ -12,8 +12,10 @@ use Illuminate\Contracts\Console\Kernel; use Illuminate\Database\Schema\Blueprint; use Illuminate\Filesystem\Filesystem; use Illuminate\Support\Facades\DB; +use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Schema; use PDO; +use Psr\Log\LoggerInterface; use Tests\TestCase; final class NfoImportServiceTest extends TestCase @@ -129,6 +131,11 @@ final class NfoImportServiceTest extends TestCase $this->assertFileExists($nfoPath); } + public function test_nfo_import_log_channel_is_available(): void + { + $this->assertInstanceOf(LoggerInterface::class, Log::channel('nfo_import')); + } + public function test_it_deletes_a_successfully_imported_nfo_when_requested(): void { $guid = '22222222-2222-4222-8222-222222222222';