Use the log rather than cout in the server.
authorCarl Hetherington <cth@carlh.net>
Sun, 23 Sep 2012 15:07:27 +0000 (16:07 +0100)
committerCarl Hetherington <cth@carlh.net>
Sun, 23 Sep 2012 15:07:27 +0000 (16:07 +0100)
src/lib/server.cc

index a627634471e2af032a9c668c86aa88bdff550fbb..f4e89455844c011e9c90870de2362f5964dcd979 100644 (file)
@@ -173,7 +173,9 @@ Server::worker_thread ()
                if (frame >= 0) {
                        struct timeval end;
                        gettimeofday (&end, 0);
-                       cout << "Encoded frame " << frame << " in " << (seconds (end) - seconds (start)) << "\n";
+                       stringstream s;
+                       s << "Encoded frame " << frame << " in " << (seconds (end) - seconds (start));
+                       _log->log (s.str ());
                }
                
                _worker_condition.notify_all ();
@@ -183,7 +185,9 @@ Server::worker_thread ()
 void
 Server::run (int num_threads)
 {
-       cout << "Server starting with " << num_threads << " threads.\n";
+       stringstream s;
+       s << "Server starting with " << num_threads << " threads.";
+       _log->log (s.str ());
        
        for (int i = 0; i < num_threads; ++i) {
                _worker_threads.push_back (new thread (bind (&Server::worker_thread, this)));