Merge lp:~mandel/location-service/verbose-logging into lp:location-service/trunk

Proposed by Manuel de la Peña
Status: Approved
Approved by: Jim Hodapp
Approved revision: 193
Proposed branch: lp:~mandel/location-service/verbose-logging
Merge into: lp:location-service/trunk
Prerequisite: lp:~mandel/location-service/first-connection
Diff against target: 81 lines (+13/-3)
3 files modified
src/location_service/com/ubuntu/location/connectivity/ofono_nm_connectivity_manager.cpp (+6/-2)
src/location_service/com/ubuntu/location/non_selecting_provider_selection_policy.cpp (+5/-0)
src/location_service/com/ubuntu/location/service/daemon.cpp (+2/-1)
To merge this branch: bzr merge lp:~mandel/location-service/verbose-logging
Reviewer Review Type Date Requested Status
Thomas Voß (community) Needs Fixing
PS Jenkins bot continuous-integration Needs Fixing
Jim Hodapp (community) code Approve
Review via email: mp+257572@code.launchpad.net

Commit message

Add extra needed logging.

Description of the change

Add extra logging to help with future bugs.

To post a comment you must log in.
Revision history for this message
Jim Hodapp (jhodapp) wrote :

Looks good

review: Approve (code)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Thomas Voß (thomas-voss) wrote :

A few comments inline.

review: Needs Fixing
194. By Manuel de la Peña

Small changes after reviews.

195. By Manuel de la Peña

Made changes according to reviews.

196. By Manuel de la Peña

Merged first-connection into verbose-logging.

Unmerged revisions

196. By Manuel de la Peña

Merged first-connection into verbose-logging.

195. By Manuel de la Peña

Made changes according to reviews.

194. By Manuel de la Peña

Small changes after reviews.

193. By Manuel de la Peña

Merged first-connection into verbose-logging.

192. By Manuel de la Peña

Increased logging.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/location_service/com/ubuntu/location/connectivity/ofono_nm_connectivity_manager.cpp'
--- src/location_service/com/ubuntu/location/connectivity/ofono_nm_connectivity_manager.cpp 2015-04-27 15:44:40 +0000
+++ src/location_service/com/ubuntu/location/connectivity/ofono_nm_connectivity_manager.cpp 2015-05-26 16:07:15 +0000
@@ -230,7 +230,7 @@
230230
231void connectivity::OfonoNmConnectivityManager::Private::on_modem_added(const core::dbus::types::ObjectPath& path)231void connectivity::OfonoNmConnectivityManager::Private::on_modem_added(const core::dbus::types::ObjectPath& path)
232{232{
233 VLOG(1) << __PRETTY_FUNCTION__;233 VLOG(1) << __PRETTY_FUNCTION__ << " mode: " << path;
234234
235 auto modem = modem_manager->modem_for_path(path);235 auto modem = modem_manager->modem_for_path(path);
236236
@@ -298,7 +298,7 @@
298298
299void connectivity::OfonoNmConnectivityManager::Private::on_modem_removed(const core::dbus::types::ObjectPath& path)299void connectivity::OfonoNmConnectivityManager::Private::on_modem_removed(const core::dbus::types::ObjectPath& path)
300{300{
301 VLOG(1) << __PRETTY_FUNCTION__;301 VLOG(1) << __PRETTY_FUNCTION__ << " modem:" << path;
302302
303 detail::CachedRadioCell::Ptr cell;303 detail::CachedRadioCell::Ptr cell;
304 {304 {
@@ -765,6 +765,10 @@
765765
766 return instance;766 return instance;
767 }767 }
768 catch (const std::exception& e)
769 {
770 LOG(WARNING) << e.what();
771 }
768 catch(...)772 catch(...)
769 {773 {
770 }774 }
771775
=== modified file 'src/location_service/com/ubuntu/location/non_selecting_provider_selection_policy.cpp'
--- src/location_service/com/ubuntu/location/non_selecting_provider_selection_policy.cpp 2015-04-23 14:48:44 +0000
+++ src/location_service/com/ubuntu/location/non_selecting_provider_selection_policy.cpp 2015-05-26 16:07:15 +0000
@@ -14,8 +14,10 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *15 *
16 * Authored by: Thomas Voß <thomas.voss@canonical.com>16 * Authored by: Thomas Voß <thomas.voss@canonical.com>
17 * Manuel de la Pena <manuel.delapena@canonical.com>
17 */18 */
1819
20#include <com/ubuntu/location/logging.h>
19#include <com/ubuntu/location/non_selecting_provider_selection_policy.h>21#include <com/ubuntu/location/non_selecting_provider_selection_policy.h>
2022
21#include <set>23#include <set>
@@ -53,16 +55,19 @@
53 {55 {
54 connections.push_back(provider->updates().position.connect([this](const location::Update<location::Position>& update)56 connections.push_back(provider->updates().position.connect([this](const location::Update<location::Position>& update)
55 {57 {
58 VLOG(10) << "Received positon update " << update;
56 mutable_updates().position(update);59 mutable_updates().position(update);
57 }));60 }));
5861
59 connections.push_back(provider->updates().heading.connect([this](const location::Update<location::Heading>& update)62 connections.push_back(provider->updates().heading.connect([this](const location::Update<location::Heading>& update)
60 {63 {
64 VLOG(10) << "Received heading update " << update;
61 mutable_updates().heading(update);65 mutable_updates().heading(update);
62 }));66 }));
6367
64 connections.push_back(provider->updates().velocity.connect([this](const location::Update<location::Velocity>& update)68 connections.push_back(provider->updates().velocity.connect([this](const location::Update<location::Velocity>& update)
65 {69 {
70 VLOG(10) << "Received velocity update " << update;
66 mutable_updates().velocity(update);71 mutable_updates().velocity(update);
67 }));72 }));
68 }73 }
6974
=== modified file 'src/location_service/com/ubuntu/location/service/daemon.cpp'
--- src/location_service/com/ubuntu/location/service/daemon.cpp 2015-04-16 10:03:29 +0000
+++ src/location_service/com/ubuntu/location/service/daemon.cpp 2015-05-26 16:07:15 +0000
@@ -195,7 +195,8 @@
195 else195 else
196 throw std::runtime_error("Problem instantiating provider");196 throw std::runtime_error("Problem instantiating provider");
197197
198 } catch(const std::runtime_error& e)198 }
199 catch(const std::runtime_error& e)
199 {200 {
200 std::cerr << "Issue instantiating provider: " << e.what() << std::endl;201 std::cerr << "Issue instantiating provider: " << e.what() << std::endl;
201 }202 }

Subscribers

People subscribed via source and target branches