summaryrefslogtreecommitdiffstats
path: root/src/socket/SocketListener.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-08-17 02:14:07 +0000
committerDavid Robillard <d@drobilla.net>2012-08-17 02:14:07 +0000
commit318b37d8b556add13b3f156f31c9e72eca339a16 (patch)
treeca7b881f8980a41eca77602b474f29964b5c89db /src/socket/SocketListener.cpp
parenta42744e1068a8630d8034df73bb344ca21a53b32 (diff)
downloadingen-318b37d8b556add13b3f156f31c9e72eca339a16.tar.gz
ingen-318b37d8b556add13b3f156f31c9e72eca339a16.tar.bz2
ingen-318b37d8b556add13b3f156f31c9e72eca339a16.zip
Implement real logging system, LV2 log extension support, and purge evil/ugly/untranslatable C++ stream printing.
Remove coloured log stuff from Raul. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4717 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/socket/SocketListener.cpp')
-rw-r--r--src/socket/SocketListener.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/socket/SocketListener.cpp b/src/socket/SocketListener.cpp
index f272513e..76afb4fd 100644
--- a/src/socket/SocketListener.cpp
+++ b/src/socket/SocketListener.cpp
@@ -19,9 +19,10 @@
#include <sstream>
-#include "ingen/Interface.hpp"
#include "ingen/AtomReader.hpp"
#include "ingen/Configuration.hpp"
+#include "ingen/Interface.hpp"
+#include "ingen/Log.hpp"
#include "ingen/World.hpp"
#include "sord/sordmm.hpp"
#include "sratom/sratom.h"
@@ -31,8 +32,6 @@
#include "SocketListener.hpp"
#include "SocketServer.hpp"
-#define LOG(s) s << "[SocketListener] "
-
namespace Ingen {
namespace Socket {
@@ -46,7 +45,7 @@ SocketListener::SocketListener(Ingen::World& world)
_unix_path = world.conf().option("socket").get_string();
const Raul::URI unix_uri("unix://" + _unix_path);
if (!_unix_sock.bind(unix_uri) || !_unix_sock.listen()) {
- LOG(Raul::error) << "Failed to create UNIX socket" << std::endl;
+ _world.log().error("Failed to create UNIX socket\n");
_unix_sock.close();
}
@@ -56,7 +55,7 @@ SocketListener::SocketListener(Ingen::World& world)
ss << "tcp://localhost:";
ss << port;
if (!_net_sock.bind(Raul::URI(ss.str())) || !_net_sock.listen()) {
- LOG(Raul::error) << "Failed to create TCP socket" << std::endl;
+ _world.log().error("Failed to create TCP socket\n");
_net_sock.close();
}
@@ -100,10 +99,10 @@ SocketListener::_run()
if (_exit_flag) {
break;
} else if (ret == -1) {
- LOG(Raul::error) << "Poll error: " << strerror(errno) << std::endl;
+ _world.log().error(Raul::fmt("Poll error: %1%\n") % strerror(errno));
break;
} else if (ret == 0) {
- LOG(Raul::error) << "Poll returned with no data" << std::endl;
+ _world.log().error("Poll returned with no data\n");
continue;
}