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

Proposed by Manuel de la Peña on 2015-04-27
Status: Approved
Approved by: Jim Hodapp on 2015-04-27
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 on 2015-04-28
PS Jenkins bot continuous-integration Needs Fixing on 2015-04-27
Jim Hodapp (community) code 2015-04-27 Approve on 2015-04-27
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.
Jim Hodapp (jhodapp) wrote :

Looks good

review: Approve (code)
Thomas Voß (thomas-voss) wrote :

A few comments inline.

review: Needs Fixing
194. By Manuel de la Peña on 2015-04-29

Small changes after reviews.

195. By Manuel de la Peña on 2015-04-29

Made changes according to reviews.

196. By Manuel de la Peña on 2015-05-26

Merged first-connection into verbose-logging.

Unmerged revisions

196. By Manuel de la Peña on 2015-05-26

Merged first-connection into verbose-logging.

195. By Manuel de la Peña on 2015-04-29

Made changes according to reviews.

194. By Manuel de la Peña on 2015-04-29

Small changes after reviews.

193. By Manuel de la Peña on 2015-04-27

Merged first-connection into verbose-logging.

192. By Manuel de la Peña on 2015-04-27

Increased logging.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/location_service/com/ubuntu/location/connectivity/ofono_nm_connectivity_manager.cpp'
2--- src/location_service/com/ubuntu/location/connectivity/ofono_nm_connectivity_manager.cpp 2015-04-27 15:44:40 +0000
3+++ src/location_service/com/ubuntu/location/connectivity/ofono_nm_connectivity_manager.cpp 2015-05-26 16:07:15 +0000
4@@ -230,7 +230,7 @@
5
6 void connectivity::OfonoNmConnectivityManager::Private::on_modem_added(const core::dbus::types::ObjectPath& path)
7 {
8- VLOG(1) << __PRETTY_FUNCTION__;
9+ VLOG(1) << __PRETTY_FUNCTION__ << " mode: " << path;
10
11 auto modem = modem_manager->modem_for_path(path);
12
13@@ -298,7 +298,7 @@
14
15 void connectivity::OfonoNmConnectivityManager::Private::on_modem_removed(const core::dbus::types::ObjectPath& path)
16 {
17- VLOG(1) << __PRETTY_FUNCTION__;
18+ VLOG(1) << __PRETTY_FUNCTION__ << " modem:" << path;
19
20 detail::CachedRadioCell::Ptr cell;
21 {
22@@ -765,6 +765,10 @@
23
24 return instance;
25 }
26+ catch (const std::exception& e)
27+ {
28+ LOG(WARNING) << e.what();
29+ }
30 catch(...)
31 {
32 }
33
34=== modified file 'src/location_service/com/ubuntu/location/non_selecting_provider_selection_policy.cpp'
35--- src/location_service/com/ubuntu/location/non_selecting_provider_selection_policy.cpp 2015-04-23 14:48:44 +0000
36+++ src/location_service/com/ubuntu/location/non_selecting_provider_selection_policy.cpp 2015-05-26 16:07:15 +0000
37@@ -14,8 +14,10 @@
38 * along with this program. If not, see <http://www.gnu.org/licenses/>.
39 *
40 * Authored by: Thomas Voß <thomas.voss@canonical.com>
41+ * Manuel de la Pena <manuel.delapena@canonical.com>
42 */
43
44+#include <com/ubuntu/location/logging.h>
45 #include <com/ubuntu/location/non_selecting_provider_selection_policy.h>
46
47 #include <set>
48@@ -53,16 +55,19 @@
49 {
50 connections.push_back(provider->updates().position.connect([this](const location::Update<location::Position>& update)
51 {
52+ VLOG(10) << "Received positon update " << update;
53 mutable_updates().position(update);
54 }));
55
56 connections.push_back(provider->updates().heading.connect([this](const location::Update<location::Heading>& update)
57 {
58+ VLOG(10) << "Received heading update " << update;
59 mutable_updates().heading(update);
60 }));
61
62 connections.push_back(provider->updates().velocity.connect([this](const location::Update<location::Velocity>& update)
63 {
64+ VLOG(10) << "Received velocity update " << update;
65 mutable_updates().velocity(update);
66 }));
67 }
68
69=== modified file 'src/location_service/com/ubuntu/location/service/daemon.cpp'
70--- src/location_service/com/ubuntu/location/service/daemon.cpp 2015-04-16 10:03:29 +0000
71+++ src/location_service/com/ubuntu/location/service/daemon.cpp 2015-05-26 16:07:15 +0000
72@@ -195,7 +195,8 @@
73 else
74 throw std::runtime_error("Problem instantiating provider");
75
76- } catch(const std::runtime_error& e)
77+ }
78+ catch(const std::runtime_error& e)
79 {
80 std::cerr << "Issue instantiating provider: " << e.what() << std::endl;
81 }

Subscribers

People subscribed via source and target branches