From 318b37d8b556add13b3f156f31c9e72eca339a16 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 17 Aug 2012 02:14:07 +0000 Subject: 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 --- src/gui/App.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'src/gui/App.cpp') diff --git a/src/gui/App.cpp b/src/gui/App.cpp index e9c9c663..cfba10c7 100644 --- a/src/gui/App.cpp +++ b/src/gui/App.cpp @@ -25,15 +25,15 @@ #include "ganv/Edge.hpp" #include "ingen/EngineBase.hpp" #include "ingen/Interface.hpp" +#include "ingen/Log.hpp" +#include "ingen/World.hpp" #include "ingen/client/ClientStore.hpp" #include "ingen/client/ObjectModel.hpp" #include "ingen/client/PatchModel.hpp" #include "ingen/client/SigClientInterface.hpp" -#include "ingen/World.hpp" #include "ingen/runtime_paths.hpp" #include "lilv/lilv.h" #include "raul/Path.hpp" -#include "raul/log.hpp" #include "App.hpp" #include "Configuration.hpp" @@ -49,8 +49,6 @@ #include "WidgetFactory.hpp" #include "WindowFactory.hpp" -#define LOG(s) (s("[GUI] ")) - using namespace std; namespace Raul { class Deletable; } @@ -148,7 +146,6 @@ App::run() break; _main->run(); - LOG(Raul::info)("Exiting\n"); } void @@ -163,7 +160,7 @@ App::attach(SharedPtr client) } _client = client; - _store = SharedPtr(new ClientStore(_world->uris(), _world->interface(), client)); + _store = SharedPtr(new ClientStore(_world->uris(), _world->log(), _world->interface(), client)); _loader = SharedPtr(new ThreadedLoader(*this, _world->interface())); _patch_tree_window->init(*this, *_store); @@ -229,10 +226,10 @@ App::property_change(const Raul::URI& subject, { if (subject == uris().ingen_engine && key == uris().ingen_sampleRate) { if (value.type() == forge().Int) { - LOG(Raul::info)(Raul::fmt("Sample rate: %1%\n") % uris().forge.str(value)); + log().info(Raul::fmt("Sample rate: %1%\n") % uris().forge.str(value)); _sample_rate = value.get_int32(); } else { - Raul::error << "Engine sample rate property is not an integer" << std::endl; + log().error("Engine sample rate property is not an integer\n"); } } } @@ -378,7 +375,8 @@ App::icon_from_path(const string& path, int size) new IconDestroyNotification(*this, make_pair(path, size)), &App::icon_destroyed); } catch (const Glib::Error& e) { - Raul::warn << "Error loading icon: " << e.what() << endl; + log().warn(Raul::fmt("Error loading icon %1%: %2%\n") + % path % e.what()); } return buf; } -- cgit v1.2.1