summaryrefslogtreecommitdiff
path: root/UnityCore
diff options
Diffstat (limited to 'UnityCore')
-rw-r--r--UnityCore/CheckOptionFilter.cpp6
-rw-r--r--UnityCore/DBusIndicators.cpp3
-rw-r--r--UnityCore/FilesystemLenses.cpp4
-rw-r--r--UnityCore/Filter.cpp6
-rw-r--r--UnityCore/GLibDBusProxy.cpp2
-rw-r--r--UnityCore/HomeLens.cpp4
-rw-r--r--UnityCore/Hud.cpp2
-rw-r--r--UnityCore/Lens.cpp3
-rw-r--r--UnityCore/Model-inl.h11
-rw-r--r--UnityCore/MultiRangeFilter.cpp6
-rw-r--r--UnityCore/Preview.cpp6
-rw-r--r--UnityCore/RadioOptionFilter.cpp6
-rw-r--r--UnityCore/RatingsFilter.cpp6
-rw-r--r--UnityCore/ResultIterator.cpp6
14 files changed, 17 insertions, 54 deletions
diff --git a/UnityCore/CheckOptionFilter.cpp b/UnityCore/CheckOptionFilter.cpp
index 12ec03716..dd5a8a585 100644
--- a/UnityCore/CheckOptionFilter.cpp
+++ b/UnityCore/CheckOptionFilter.cpp
@@ -25,11 +25,7 @@ namespace unity
{
namespace dash
{
-
-namespace
-{
-nux::logging::Logger logger("unity.dash.checkoptionfilter");
-}
+DECLARE_LOGGER(logger, "unity.dash.filter.checkoption");
CheckOptionFilter::CheckOptionFilter(DeeModel* model, DeeModelIter* iter)
: Filter(model, iter)
diff --git a/UnityCore/DBusIndicators.cpp b/UnityCore/DBusIndicators.cpp
index 49250973f..8432c7ddb 100644
--- a/UnityCore/DBusIndicators.cpp
+++ b/UnityCore/DBusIndicators.cpp
@@ -32,11 +32,10 @@ namespace unity
{
namespace indicator
{
+DECLARE_LOGGER(logger, "unity.indicator.dbus");
namespace
{
-nux::logging::Logger logger("unity.indicator.DBusIndicators");
-
const std::string SERVICE_NAME("com.canonical.Unity.Panel.Service");
const std::string SERVICE_PATH("/com/canonical/Unity/Panel/Service");
const std::string SERVICE_IFACE("com.canonical.Unity.Panel.Service");
diff --git a/UnityCore/FilesystemLenses.cpp b/UnityCore/FilesystemLenses.cpp
index 189a9410f..186fc071a 100644
--- a/UnityCore/FilesystemLenses.cpp
+++ b/UnityCore/FilesystemLenses.cpp
@@ -37,13 +37,11 @@ namespace unity
{
namespace dash
{
+DECLARE_LOGGER(logger, "unity.dash.lens.filesystem");
namespace
{
-
-nux::logging::Logger logger("unity.dash.filesystemlenses");
const char* GROUP = "Lens";
-
}
// Loads data from a Lens key-file in a usable form
diff --git a/UnityCore/Filter.cpp b/UnityCore/Filter.cpp
index 233098d49..a4917e442 100644
--- a/UnityCore/Filter.cpp
+++ b/UnityCore/Filter.cpp
@@ -30,11 +30,7 @@ namespace unity
{
namespace dash
{
-
-namespace
-{
-nux::logging::Logger logger("unity.dash.filter");
-}
+DECLARE_LOGGER(logger, "unity.dash.filter");
using unity::glib::Signal;
diff --git a/UnityCore/GLibDBusProxy.cpp b/UnityCore/GLibDBusProxy.cpp
index bcd22bb18..bd1be335d 100644
--- a/UnityCore/GLibDBusProxy.cpp
+++ b/UnityCore/GLibDBusProxy.cpp
@@ -33,11 +33,11 @@ namespace unity
{
namespace glib
{
+DECLARE_LOGGER(logger, "unity.glib.dbusproxy");
namespace
{
const unsigned MAX_RECONNECTION_ATTEMPTS = 5;
-nux::logging::Logger logger("unity.glib.dbusproxy");
}
using std::string;
diff --git a/UnityCore/HomeLens.cpp b/UnityCore/HomeLens.cpp
index e04d3e95f..2adde7ef2 100644
--- a/UnityCore/HomeLens.cpp
+++ b/UnityCore/HomeLens.cpp
@@ -38,12 +38,10 @@ namespace unity
{
namespace dash
{
+DECLARE_LOGGER(logger, "unity.dash.lens.home");
namespace
{
-
-nux::logging::Logger logger("unity.dash.homelens");
-
const gchar* const HOMELENS_PRIORITY = "unity-homelens-priority";
const gchar* const HOMELENS_RESULTS_MODEL = "unity-homelens-results-model";
diff --git a/UnityCore/Hud.cpp b/UnityCore/Hud.cpp
index 730dc1766..d7502f5ba 100644
--- a/UnityCore/Hud.cpp
+++ b/UnityCore/Hud.cpp
@@ -33,10 +33,10 @@ namespace unity
{
namespace hud
{
+DECLARE_LOGGER(logger, "unity.hud.impl");
namespace
{
-nux::logging::Logger logger("unity.hud.hud");
const int request_number_of_results = 6;
}
diff --git a/UnityCore/Lens.cpp b/UnityCore/Lens.cpp
index 35bce189b..f0d7bac37 100644
--- a/UnityCore/Lens.cpp
+++ b/UnityCore/Lens.cpp
@@ -32,11 +32,10 @@ namespace unity
{
namespace dash
{
+DECLARE_LOGGER(logger, "unity.dash.lens");
namespace
{
-nux::logging::Logger logger("unity.dash.lens");
-
const unsigned CATEGORY_COLUMN = 2;
}
diff --git a/UnityCore/Model-inl.h b/UnityCore/Model-inl.h
index f560c8137..0d4dff694 100644
--- a/UnityCore/Model-inl.h
+++ b/UnityCore/Model-inl.h
@@ -27,11 +27,6 @@ namespace unity
namespace dash
{
-namespace
-{
-nux::logging::Logger _model_inl_logger("unity.dash.model");
-}
-
template<class RowAdaptor>
Model<RowAdaptor>::Model()
: model_type_(ModelType::REMOTE)
@@ -67,10 +62,12 @@ void Model<RowAdaptor>::Init ()
template<class RowAdaptor>
void Model<RowAdaptor>::OnSwarmNameChanged(std::string const& swarm_name)
{
+ static nux::logging::Logger local_logger("unity.dash.model");
+
typedef glib::Signal<void, DeeModel*, DeeModelIter*> RowSignalType;
typedef glib::Signal<void, DeeModel*, guint64, guint64> TransactionSignalType;
- LOG_DEBUG(_model_inl_logger) << "New swarm name: " << swarm_name;
+ LOG_DEBUG(local_logger) << "New swarm name: " << swarm_name;
// Let the views clean up properly
if (model_)
@@ -95,7 +92,7 @@ void Model<RowAdaptor>::OnSwarmNameChanged(std::string const& swarm_name)
sigc::mem_fun(this, &Model<RowAdaptor>::OnTransactionEnd)));
break;
default:
- LOG_ERROR(_model_inl_logger) << "Unexpected ModelType " << model_type_;
+ LOG_ERROR(local_logger) << "Unexpected ModelType " << model_type_;
break;
}
diff --git a/UnityCore/MultiRangeFilter.cpp b/UnityCore/MultiRangeFilter.cpp
index 012b70730..0c14a383a 100644
--- a/UnityCore/MultiRangeFilter.cpp
+++ b/UnityCore/MultiRangeFilter.cpp
@@ -25,11 +25,7 @@ namespace unity
{
namespace dash
{
-
-namespace
-{
-nux::logging::Logger logger("unity.dash.multirangefilter");
-}
+DECLARE_LOGGER(logger, "unity.dash.filter.multirange");
MultiRangeFilter::MultiRangeFilter(DeeModel* model, DeeModelIter* iter)
: Filter(model, iter)
diff --git a/UnityCore/Preview.cpp b/UnityCore/Preview.cpp
index c0ac9f3fd..37f35576a 100644
--- a/UnityCore/Preview.cpp
+++ b/UnityCore/Preview.cpp
@@ -35,11 +35,7 @@ namespace unity
{
namespace dash
{
-
-namespace
-{
- nux::logging::Logger logger("unity.dash.preview");
-}
+DECLARE_LOGGER(logger, "unity.dash.preview");
Preview::Ptr Preview::PreviewForProtocolObject(glib::Object<GObject> const& proto_obj)
{
diff --git a/UnityCore/RadioOptionFilter.cpp b/UnityCore/RadioOptionFilter.cpp
index d67314be8..74521d965 100644
--- a/UnityCore/RadioOptionFilter.cpp
+++ b/UnityCore/RadioOptionFilter.cpp
@@ -25,11 +25,7 @@ namespace unity
{
namespace dash
{
-
-namespace
-{
-nux::logging::Logger logger("unity.dash.radiooptionfilter");
-}
+DECLARE_LOGGER(logger, "unity.dash.filter.radiooption");
RadioOptionFilter::RadioOptionFilter(DeeModel* model, DeeModelIter* iter)
: Filter(model, iter)
diff --git a/UnityCore/RatingsFilter.cpp b/UnityCore/RatingsFilter.cpp
index 5d2bc2218..53869546e 100644
--- a/UnityCore/RatingsFilter.cpp
+++ b/UnityCore/RatingsFilter.cpp
@@ -25,11 +25,7 @@ namespace unity
{
namespace dash
{
-
-namespace
-{
-nux::logging::Logger logger("unity.dash.ratingsfilter");
-}
+DECLARE_LOGGER(logger, "unity.dash.filter.ratings");
RatingsFilter::RatingsFilter(DeeModel* model, DeeModelIter* iter)
: Filter(model, iter)
diff --git a/UnityCore/ResultIterator.cpp b/UnityCore/ResultIterator.cpp
index 46592f97d..24df34135 100644
--- a/UnityCore/ResultIterator.cpp
+++ b/UnityCore/ResultIterator.cpp
@@ -23,11 +23,7 @@ namespace unity
{
namespace dash
{
-
-namespace
-{
- nux::logging::Logger logger("unity.dash.resultiterator");
-}
+DECLARE_LOGGER(logger, "unity.dash.resultiterator");
ResultIterator::ResultIterator(glib::Object<DeeModel> model)
: model_(model)