Skip to content

Commit

Permalink
update logging
Browse files Browse the repository at this point in the history
  • Loading branch information
joedixon committed Apr 28, 2023
1 parent b2434c3 commit a41e0c4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Loggers/StandardLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Laravel\Reverb\Loggers;

use Illuminate\Support\Facades\Log;
use Laravel\Reverb\Contracts\Logger;

class StandardLogger implements Logger
Expand All @@ -17,15 +18,15 @@ public function info(string $title, string $message = null): void
$output .= ': '.$message;
}

fwrite(STDOUT, $output.PHP_EOL);
Log::info($output);
}

/**
* Log an error message.
*/
public function error(string $string): void
{
fwrite(STDERR, $string.PHP_EOL);
Log::error($string);
}

/**
Expand All @@ -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);
}
}

0 comments on commit a41e0c4

Please sign in to comment.