adopt CI-like patterns
[plcapi.git] / src / Helper / Logger.php
index 56f633d..bee7b08 100644 (file)
@@ -2,12 +2,16 @@
 
 namespace PhpXmlRpc\Helper;
 
+/**
+ * @todo implement an interface
+ * @todo make constructor private to force users to go through `instance()` ?
+ */
 class Logger
 {
     protected static $instance = null;
 
     /**
-     * This class is singleton, so that later we can move to DI patterns.
+     * This class can be used as singleton, so that later we can move to DI patterns.
      *
      * @return Logger
      */
@@ -56,4 +60,13 @@ class Logger
         // let the user see this now in case there's a time out later...
         flush();
     }
+
+    /**
+     * Writes a message to the error log
+     * @param string $message
+     */
+    public function errorLog($message)
+    {
+        error_log($message);
+    }
 }