From a41e0c4fa4acf87faf2c20a08fad81b37b89fd46 Mon Sep 17 00:00:00 2001 From: Joe Dixon Date: Fri, 28 Apr 2023 10:02:34 +0100 Subject: [PATCH] update logging --- src/Loggers/StandardLogger.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Loggers/StandardLogger.php b/src/Loggers/StandardLogger.php index eea8a413..f2f51dba 100644 --- a/src/Loggers/StandardLogger.php +++ b/src/Loggers/StandardLogger.php @@ -2,6 +2,7 @@ namespace Laravel\Reverb\Loggers; +use Illuminate\Support\Facades\Log; use Laravel\Reverb\Contracts\Logger; class StandardLogger implements Logger @@ -17,7 +18,7 @@ public function info(string $title, string $message = null): void $output .= ': '.$message; } - fwrite(STDOUT, $output.PHP_EOL); + Log::info($output); } /** @@ -25,7 +26,7 @@ public function info(string $title, string $message = null): void */ public function error(string $string): void { - fwrite(STDERR, $string.PHP_EOL); + Log::error($string); } /** @@ -49,6 +50,6 @@ public function message(string $message): void $message = json_encode($message, JSON_PRETTY_PRINT); - fwrite(STDOUT, $message.PHP_EOL); + Log::info($message); } }