summaryrefslogtreecommitdiff
path: root/src/Drivers/OutputDriver.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Drivers/OutputDriver.php')
-rw-r--r--src/Drivers/OutputDriver.php19
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