diff options
Diffstat (limited to 'include/ingen/Log.hpp')
-rw-r--r-- | include/ingen/Log.hpp | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/include/ingen/Log.hpp b/include/ingen/Log.hpp index 5310c768..afde276a 100644 --- a/include/ingen/Log.hpp +++ b/include/ingen/Log.hpp @@ -1,6 +1,6 @@ /* This file is part of Ingen. - Copyright 2007-2016 David Robillard <http://drobilla.net/> + Copyright 2007-2024 David Robillard <http://drobilla.net/> Ingen is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free @@ -17,17 +17,15 @@ #ifndef INGEN_LOG_HPP #define INGEN_LOG_HPP -#include "ingen/LV2Features.hpp" -#include "ingen/fmt.hpp" // IWYU pragma: export -#include "ingen/ingen.h" -#include "lv2/core/lv2.h" -#include "lv2/log/log.h" -#include "lv2/urid/urid.h" +#include <ingen/LV2Features.hpp> +#include <ingen/fmt.hpp> +#include <ingen/ingen.h> +#include <lv2/core/lv2.h> +#include <lv2/log/log.h> +#include <lv2/urid/urid.h> #include <cstdarg> -#include <cstdio> #include <functional> -#include <memory> #include <string> #include <utility> @@ -35,9 +33,9 @@ namespace ingen { class Node; class URIs; -class World; -class INGEN_API Log { +class INGEN_API Log +{ public: using Sink = std::function<int(LV2_URID, const char*, va_list)>; @@ -88,21 +86,20 @@ public: } int vtprintf(LV2_URID type, const char* fmt, va_list args); + int tprintf(LV2_URID type, const char* fmt, ...); void set_flush(bool f) { _flush = f; } void set_trace(bool f) { _trace = f; } void set_sink(Sink s) { _sink = std::move(s); } private: - void print(FILE* stream, const std::string& msg) const; - LV2_Log_Log* _log; URIs& _uris; Sink _sink; - bool _flush; - bool _trace; + bool _flush{false}; + bool _trace{false}; }; } // namespace ingen -#endif // INGEN_LOG_HPP +#endif // INGEN_LOG_HPP |