summaryrefslogtreecommitdiffstats
path: root/ingen
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2016-08-01 03:43:23 -0400
committerDavid Robillard <d@drobilla.net>2016-08-01 03:44:00 -0400
commit902703efa9425a0630053c10229de911e23a2a43 (patch)
tree078b44cf205f8f7a3265142ff95b36f08f56fa05 /ingen
parentff6d8a87f9569a42c7827428f2329280c9b633b9 (diff)
downloadingen-902703efa9425a0630053c10229de911e23a2a43.tar.gz
ingen-902703efa9425a0630053c10229de911e23a2a43.tar.bz2
ingen-902703efa9425a0630053c10229de911e23a2a43.zip
Show colorized log output in messages window
Diffstat (limited to 'ingen')
-rw-r--r--ingen/Log.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/ingen/Log.hpp b/ingen/Log.hpp
index a868e714..189754e2 100644
--- a/ingen/Log.hpp
+++ b/ingen/Log.hpp
@@ -17,6 +17,7 @@
#ifndef INGEN_LOG_HPP
#define INGEN_LOG_HPP
+#include <functional>
#include <string>
#include <boost/format.hpp>
@@ -33,6 +34,8 @@ class URIs;
class INGEN_API Log {
public:
+ typedef std::function<int(LV2_URID, const char*, va_list)> Sink;
+
Log(LV2_Log_Log* log, URIs& uris);
struct Feature : public LV2Features::Feature {
@@ -60,12 +63,14 @@ public:
void set_flush(bool f) { _flush = f; }
void set_trace(bool f) { _trace = f; }
+ void set_sink(Sink s) { _sink = s; }
private:
void print(FILE* stream, const std::string& msg);
LV2_Log_Log* _log;
URIs& _uris;
+ Sink _sink;
bool _flush;
bool _trace;
};