summaryrefslogtreecommitdiffstats
path: root/src/engine/events
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-01-06 23:49:17 +0000
committerDavid Robillard <d@drobilla.net>2010-01-06 23:49:17 +0000
commitcb5e934666e128e27faa95587fbdecf01f0e324d (patch)
tree1e694e2812381efbb3eb4b5ace2cdecc118b29f6 /src/engine/events
parent092eb35edb999a9dd809e197d7dd9a4ebb0d6bd5 (diff)
downloadingen-cb5e934666e128e27faa95587fbdecf01f0e324d.tar.gz
ingen-cb5e934666e128e27faa95587fbdecf01f0e324d.tar.bz2
ingen-cb5e934666e128e27faa95587fbdecf01f0e324d.zip
Do all logging output via Raul streams.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2349 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/events')
-rw-r--r--src/engine/events/CreatePort.cpp4
-rw-r--r--src/engine/events/Disconnect.cpp8
-rw-r--r--src/engine/events/SetMetadata.cpp3
-rw-r--r--src/engine/events/SetPortValue.cpp11
4 files changed, 14 insertions, 12 deletions
diff --git a/src/engine/events/CreatePort.cpp b/src/engine/events/CreatePort.cpp
index ea2b3efa..299e60e9 100644
--- a/src/engine/events/CreatePort.cpp
+++ b/src/engine/events/CreatePort.cpp
@@ -70,10 +70,8 @@ CreatePort::CreatePort(
* TODO: fix this using RCU?
*/
- if (_data_type == PortType::UNKNOWN) {
- cerr << "[CreatePortEvent] Unknown port type " << type << endl;
+ if (_data_type == PortType::UNKNOWN)
_error = UNKNOWN_TYPE;
- }
}
diff --git a/src/engine/events/Disconnect.cpp b/src/engine/events/Disconnect.cpp
index 77878d43..c0fc9656 100644
--- a/src/engine/events/Disconnect.cpp
+++ b/src/engine/events/Disconnect.cpp
@@ -15,6 +15,7 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "raul/log.hpp"
#include "raul/Maid.hpp"
#include "raul/Path.hpp"
#include "events/Disconnect.hpp"
@@ -29,6 +30,7 @@
#include "EngineStore.hpp"
using namespace std;
+using namespace Raul;
namespace Ingen {
namespace Events {
@@ -175,8 +177,8 @@ Disconnect::execute(ProcessContext& context)
assert(_patch_connection);
if (port_connection->elem() != _patch_connection->elem()) {
- cerr << "ERROR: Corrupt connections:" << endl;
- cerr << "\t" << port_connection->elem() << ": "
+ error << "Corrupt connections:" << endl
+ << "\t" << port_connection->elem() << ": "
<< port_connection->elem()->src_port_path()
<< " -> " << port_connection->elem()->dst_port_path() << endl
<< "!=" << endl
@@ -207,10 +209,8 @@ Disconnect::post_process()
_responder->respond_ok();
_engine.broadcaster()->send_disconnection(_src_port->path(), _dst_port->path());
} else {
- // FIXME: better error messages
string msg = "Unable to disconnect ";
msg.append(_src_port_path.str() + " -> " + _dst_port_path.str());
- cerr << "DISCONNECTION ERROR " << (unsigned)_error << endl;
_responder->respond_error(msg);
}
}
diff --git a/src/engine/events/SetMetadata.cpp b/src/engine/events/SetMetadata.cpp
index e058b1f4..53e79977 100644
--- a/src/engine/events/SetMetadata.cpp
+++ b/src/engine/events/SetMetadata.cpp
@@ -17,6 +17,7 @@
#include <string>
#include <boost/format.hpp>
+#include "raul/log.hpp"
#include "interface/PortType.hpp"
#include "ClientBroadcaster.hpp"
#include "CreateNode.hpp"
@@ -174,7 +175,7 @@ SetMetadata::pre_process()
ev->pre_process();
_set_events.push_back(ev);
} else {
- cerr << "WARNING: Set value for non-port " << _object->uri() << endl;
+ warn << "Set value for non-port " << _object->uri() << endl;
}
}
}
diff --git a/src/engine/events/SetPortValue.cpp b/src/engine/events/SetPortValue.cpp
index 5efc35ae..de1190fb 100644
--- a/src/engine/events/SetPortValue.cpp
+++ b/src/engine/events/SetPortValue.cpp
@@ -16,6 +16,7 @@
*/
#include <sstream>
+#include "raul/log.hpp"
#include "event.lv2/event.h"
#include "shared/LV2URIMap.hpp"
#include "shared/LV2Features.hpp"
@@ -207,15 +208,15 @@ SetPortValue::apply(Context& context)
if (obuf) {
obuf->object()->size = obuf->size() - sizeof(LV2_Object);
if (LV2Object::from_atom(_engine.world(), _value, obuf->object())) {
- cout << "Converted atom " << _value << " :: " << obuf->object()->type
+ debug << "Converted atom " << _value << " :: " << obuf->object()->type
<< " * " << obuf->object()->size << " @ " << obuf->object() << endl;
return;
} else {
- cerr << "WARNING: Failed to convert atom to LV2 object" << endl;
+ warn << "Failed to convert atom to LV2 object" << endl;
}
}
- cerr << "WARNING: Unknown value type " << (int)_value.type() << endl;
+ warn << "Unknown value type " << (int)_value.type() << endl;
}
}
@@ -232,7 +233,9 @@ SetPortValue::post_process()
_engine.broadcaster()->send_port_value(_port_path, _value);
break;
case TYPE_MISMATCH:
- _responder->respond_error("type mismatch");
+ ss << "Illegal value type " << _value.type()
+ << " for port " << _port_path << endl;
+ _responder->respond_error(ss.str());
break;
case ILLEGAL_VOICE:
ss << "Illegal voice number " << _voice_num;