diff --git a/dataengines/geolocation/CMakeLists.txt b/dataengines/geolocation/CMakeLists.txt --- a/dataengines/geolocation/CMakeLists.txt +++ b/dataengines/geolocation/CMakeLists.txt @@ -67,6 +67,7 @@ if(LIBGPS_FOUND) include_directories(${LIBGPS_INCLUDES} ${LIBGPS_INCLUDE_DIR}) set(plasma_geolocation_gps_SRCS location_gps.cpp) + ecm_qt_declare_logging_category(plasma_geolocation_gps_SRCS HEADER geolocdebug.h IDENTIFIER DATAENGINE_GEOLOCATION CATEGORY_NAME org.kde.plasma.dataengine.geolocation) add_library(plasma-geolocation-gps MODULE ${plasma_geolocation_gps_SRCS}) target_link_libraries(plasma-geolocation-gps plasma-geolocation-interface ${LIBGPS_LIBRARIES}) install(FILES plasma-geolocation-gps.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR}) diff --git a/dataengines/geolocation/location_gps.cpp b/dataengines/geolocation/location_gps.cpp --- a/dataengines/geolocation/location_gps.cpp +++ b/dataengines/geolocation/location_gps.cpp @@ -16,7 +16,7 @@ */ #include "location_gps.h" -#include +#include "geolocdebug.h" Gpsd::Gpsd(gps_data_t* gpsdata) : m_gpsdata(gpsdata) @@ -90,12 +90,12 @@ gps_data_t* m_gpsdata = gps_open("localhost", DEFAULT_GPSD_PORT); if (m_gpsdata) { #endif - qDebug() << "gpsd found."; + qDebug(DATAENGINE_GEOLOCATION)<< "gpsd found."; m_gpsd = new Gpsd(m_gpsdata); connect(m_gpsd, SIGNAL(dataReady(Plasma::DataEngine::Data)), this, SLOT(setData(Plasma::DataEngine::Data))); } else { - qDebug() << "gpsd not found"; + qWarning(DATAENGINE_GEOLOCATION) << "gpsd not found"; } setIsAvailable(m_gpsd); diff --git a/plasma-workspace.categories b/plasma-workspace.categories --- a/plasma-workspace.categories +++ b/plasma-workspace.categories @@ -2,3 +2,4 @@ org.kde.plasma.runner.services Plasma Runner Services DEFAULT_SEVERITY [WARNING] IDENTIFIER [RUNNER_SERVICES] org.kde.plasma.runner.appstream Plasma Runner Appstream DEFAULT_SEVERITY [WARNING] IDENTIFIER [RUNNER_APPSTREAM] org.kde.plasma.runner.bookmarks Plasma Runner Bookmarks DEFAULT_SEVERITY [WARNING] IDENTIFIER [RUNNER_BOOKMARKS] +org.kde.plasma.dataengine.geolocation Plasma Data engine Geolocation DEFAULT_SEVERITY [WARNING] IDENTIFIER [DATAENGINE_GEOLOCATION]