diff options
| author | Asko Nõmm <asko@nth.ee> | 2024-11-10 22:28:03 +0200 |
|---|---|---|
| committer | Asko Nõmm <asko@nth.ee> | 2024-11-10 22:28:03 +0200 |
| commit | 12b6c4b3008c2df545c537943d4e38323cfc174e (patch) | |
| tree | 11e427a794832ac73657da675f3d79949443a3f6 /src/Drivers/OutputDriver.php | |
Initial commit
Diffstat (limited to 'src/Drivers/OutputDriver.php')
| -rw-r--r-- | src/Drivers/OutputDriver.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/Drivers/OutputDriver.php b/src/Drivers/OutputDriver.php new file mode 100644 index 0000000..93c97ba --- /dev/null +++ b/src/Drivers/OutputDriver.php @@ -0,0 +1,19 @@ +<?php + +namespace Asko\Loggr\Drivers; + +use Asko\Loggr\Driver; + +class OutputDriver implements Driver +{ + /** + * Writes the provided serialized message to the standard output stream. + * + * @param string $serializedMessage The message to be logged, in a serialized format. + * @return void + */ + public function log(string $serializedMessage): void + { + file_put_contents('php://output', $serializedMessage); + } +}
\ No newline at end of file |
