Report CLI server errors to stderr as well as the log.
authorCarl Hetherington <cth@carlh.net>
Tue, 10 Jun 2014 08:34:37 +0000 (09:34 +0100)
committerCarl Hetherington <cth@carlh.net>
Tue, 10 Jun 2014 08:34:37 +0000 (09:34 +0100)
src/lib/server.cc

index 6b4064cd7ebae77fdca24040228c7a5169cf9505..ed7fb6145c6a4b4498bbf6e3ff552a8fd3b8e01b 100644 (file)
@@ -104,6 +104,7 @@ Server::process (shared_ptr<Socket> socket, struct timeval& after_read, struct t
        try {
                encoded->send (socket);
        } catch (std::exception& e) {
+               cerr << "Send failed; frame " << dcp_video_frame.index() << "\n";
                LOG_ERROR ("Send failed; frame %1", dcp_video_frame.index());
                throw;
        }
@@ -139,6 +140,7 @@ Server::worker_thread ()
                        frame = process (socket, after_read, after_encode);
                        ip = socket->socket().remote_endpoint().address().to_string();
                } catch (std::exception& e) {
+                       cerr << "Error: " << e.what() << "\n";
                        LOG_ERROR ("Error: %1", e.what());
                }