Mailer.php
authorAlan Knowles <alan@roojs.com>
Tue, 22 Sep 2015 03:11:06 +0000 (11:11 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 22 Sep 2015 03:11:06 +0000 (11:11 +0800)
Mailer.php

index 3fe7078..5763600 100644 (file)
@@ -522,6 +522,17 @@ class Pman_Core_Mailer {
          
         
     }
-    
+    var $debug = 1;
+    function log($val)
+    {
+        if (!$debug) {
+            return;
+        }
+        $fh = fopen('/tmp/core_mailer.log', 'a');
+        fwrite($fh, date('Y-m-d H:i:s -') . json_encode($val) . "\n");
+        fclose($fh);
+        
+        
+    }
     
 }
\ No newline at end of file