]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
if not in daemon mode, xmppdaemon sends log to stdout
authorEvan Prodromou <evan@controlyourself.ca>
Sun, 28 Jun 2009 20:38:59 +0000 (16:38 -0400)
committerEvan Prodromou <evan@controlyourself.ca>
Sun, 28 Jun 2009 20:38:59 +0000 (16:38 -0400)
scripts/xmppdaemon.php

index 608cc1a36c3704bc71e1eea696eaa7bc31782448..3e46c8e2607e242557b20fa4eaea0817ebc214f2 100755 (executable)
@@ -309,7 +309,14 @@ class XMPPDaemon extends Daemon
 
     function log($level, $msg)
     {
-        common_log($level, 'XMPPDaemon('.$this->resource.'): '.$msg);
+        $text = 'XMPPDaemon('.$this->resource.'): '.$msg;
+        common_log($level, $text);
+        if (!$this->daemonize)
+        {
+            $line = common_log_line($level, $text);
+            echo $line;
+            echo "\n";
+        }
     }
 
     function subscribed($to)