summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-09-23 16:07:27 +0100
committerCarl Hetherington <cth@carlh.net>2012-09-23 16:07:27 +0100
commitabffa79d5fee94b2123c9ea8516b7e9a052f1a97 (patch)
tree9dae67ab0afc68f4513cb30d90a9a02ab54d299c /src/lib
parenta8e064b831718a3b06035c12ae94c3caa7a1b4b3 (diff)
Use the log rather than cout in the server.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/server.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/server.cc b/src/lib/server.cc
index a62763447..f4e894558 100644
--- a/src/lib/server.cc
+++ b/src/lib/server.cc
@@ -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)));