diff --git a/src/LaravelLogTest/Console/Commands/LogTest.php b/src/LaravelLogTest/Console/Commands/LogTest.php index b6b82c6..c808187 100644 --- a/src/LaravelLogTest/Console/Commands/LogTest.php +++ b/src/LaravelLogTest/Console/Commands/LogTest.php @@ -3,6 +3,7 @@ namespace LaravelLogTest\Console\Commands; use Illuminate\Console\Command; +use Illuminate\Support\Facades\Log; class LogTest extends Command { @@ -38,7 +39,7 @@ public function __construct() */ public function handle() { - throw new \Exception('TEST: uncaught exception thrown in command'); + Log::warning('test'); } diff --git a/src/LaravelLogTest/Console/Commands/LogTestCommand.php b/src/LaravelLogTest/Console/Commands/LogTestCommand.php index 15f0b4a..8d985ec 100644 --- a/src/LaravelLogTest/Console/Commands/LogTestCommand.php +++ b/src/LaravelLogTest/Console/Commands/LogTestCommand.php @@ -4,6 +4,7 @@ use App\Jobs\ThrowUncaughtException; use Illuminate\Console\Command; +use Illuminate\Support\Facades\Log; class LogTestCommand extends Command { @@ -39,6 +40,7 @@ public function __construct() */ public function handle() { + Log::warning('TEST: log warning statement called directly in command'); throw new \Exception('TEST: uncaught exception thrown in command'); } diff --git a/src/LaravelLogTest/Console/Commands/LogTestQueue.php b/src/LaravelLogTest/Console/Commands/LogTestQueue.php index a35109b..999b4bb 100644 --- a/src/LaravelLogTest/Console/Commands/LogTestQueue.php +++ b/src/LaravelLogTest/Console/Commands/LogTestQueue.php @@ -3,7 +3,7 @@ namespace LaravelLogTest\Console\Commands; use Illuminate\Console\Command; -use LaravelLogTest\Jobs\ThrowUncaughtException; +use \LaravelLogTest\Jobs\ThrowUncaughtException; class LogTestQueue extends Command { diff --git a/src/LaravelLogTest/Jobs/ThrowUncaughtException.php b/src/LaravelLogTest/Jobs/ThrowUncaughtException.php index e74a421..fef9170 100644 --- a/src/LaravelLogTest/Jobs/ThrowUncaughtException.php +++ b/src/LaravelLogTest/Jobs/ThrowUncaughtException.php @@ -7,6 +7,7 @@ use Illuminate\Foundation\Bus\Dispatchable; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Queue\SerializesModels; +use Illuminate\Support\Facades\Log; class ThrowUncaughtException implements ShouldQueue { @@ -28,6 +29,7 @@ public function __construct() */ public function handle(): void { + Log::warning('TEST: log warning statement called directly in queue job'); throw new \Exception('TEST: uncaught exception thrown in queue job'); } }