]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
add logging utilities to Plugin class
authorEvan Prodromou <evan@status.net>
Fri, 4 Dec 2009 20:34:25 +0000 (15:34 -0500)
committerEvan Prodromou <evan@status.net>
Fri, 4 Dec 2009 20:34:25 +0000 (15:34 -0500)
lib/plugin.php

index 87d7be5a7597296bb2c2d777358f7365455beb5d..2c77c3e120e134cac7ea5d54235b5852cab74655 100644 (file)
@@ -76,4 +76,14 @@ class Plugin
     {
         return true;
     }
+
+    protected function log($level, $msg)
+    {
+        common_log($level, get_class($this) . ': '.$msg);
+    }
+
+    protected function debug($msg)
+    {
+        $this->log(LOG_DEBUG, $msg);
+    }
 }