specific log files for commands and jobs
This commit is contained in:
@@ -6,6 +6,7 @@ use App\Services\JobEnrichmentService;
|
||||
use Illuminate\Console\Attributes\Description;
|
||||
use Illuminate\Console\Attributes\Signature;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
#[Signature('jobs:enrich {--batch=100}')]
|
||||
#[Description('Enrich job listings with additional data (categories, experience levels, etc.)')]
|
||||
@@ -27,6 +28,9 @@ class EnrichJobs extends Command
|
||||
{
|
||||
$batchSize = (int) $this->option('batch');
|
||||
|
||||
$log = Log::channel('jobs_enrich');
|
||||
$log->info('Starting job enrichment', ['batch_size' => $batchSize]);
|
||||
|
||||
$this->info('Enriching job listings...');
|
||||
$this->newLine();
|
||||
|
||||
@@ -34,6 +38,7 @@ class EnrichJobs extends Command
|
||||
|
||||
$this->newLine();
|
||||
$this->info("Enriched {$enrichedCount} jobs successfully!");
|
||||
$log->info('Enrichment complete', ['enriched' => $enrichedCount]);
|
||||
|
||||
return self::SUCCESS;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user