diff options
author | David Robillard <d@drobilla.net> | 2016-08-01 03:43:23 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2016-08-01 03:44:00 -0400 |
commit | 902703efa9425a0630053c10229de911e23a2a43 (patch) | |
tree | 078b44cf205f8f7a3265142ff95b36f08f56fa05 /ingen | |
parent | ff6d8a87f9569a42c7827428f2329280c9b633b9 (diff) | |
download | ingen-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.hpp | 5 |
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; }; |