Merge lp:~chipaca/ubuntu-push/lots-of-small-logging-changes into lp:ubuntu-push/automatic

Proposed by John Lenton
Status: Merged
Approved by: John Lenton
Approved revision: 357
Merged at revision: 355
Proposed branch: lp:~chipaca/ubuntu-push/lots-of-small-logging-changes
Merge into: lp:ubuntu-push/automatic
Diff against target: 171 lines (+16/-15)
9 files modified
bus/connectivity/connectivity.go (+5/-5)
bus/connectivity/webchecker.go (+4/-4)
bus/endpoint.go (+1/-1)
bus/systemimage/systemimage.go (+1/-1)
client/service/postal.go (+0/-1)
client/session/session.go (+2/-0)
dependencies.tsv (+1/-1)
launch_helper/kindpool.go (+1/-1)
poller/poller.go (+1/-1)
To merge this branch: bzr merge lp:~chipaca/ubuntu-push/lots-of-small-logging-changes
Reviewer Review Type Date Requested Status
Bret Barker (community) Approve
Review via email: mp+247180@code.launchpad.net

Commit message

A clean-up of a lot of small logging changes done during debugging.

Description of the change

A clean-up of a lot of small logging changes done during debugging.

To post a comment you must log in.
357. By John Lenton

one more small logging change

Revision history for this message
Bret Barker (noise) wrote :

+1

review: Approve
358. By John Lenton

missed a capita-cased log line

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bus/connectivity/connectivity.go'
2--- bus/connectivity/connectivity.go 2014-07-04 19:12:38 +0000
3+++ bus/connectivity/connectivity.go 2015-01-21 17:26:27 +0000
4@@ -82,7 +82,7 @@
5 // Get the current state.
6 initial = nm.GetState()
7 if initial == networkmanager.Unknown {
8- cs.log.Debugf("Failed to get state.")
9+ cs.log.Debugf("failed to get state.")
10 goto Continue
11 }
12 cs.log.Debugf("got initial state of %s", initial)
13@@ -143,17 +143,17 @@
14
15 case <-cs.timer.C:
16 if cs.currentState == networkmanager.ConnectedGlobal {
17- log.Debugf("May be connected; checking...")
18+ log.Debugf("may be connected; checking...")
19 cs.webgetCh = make(chan bool)
20 go cs.webget(cs.webgetCh)
21 }
22
23 case connected := <-cs.webgetCh:
24 cs.timer.Reset(recheckTimeout)
25- log.Debugf("Connection check says: %t", connected)
26+ log.Debugf("connection check says: %t", connected)
27 cs.webgetCh = nil
28 if connected && cs.lastSent == false {
29- log.Infof("Sending 'connected'.")
30+ log.Debugf("sending 'connected'.")
31 cs.lastSent = true
32 break Loop
33 }
34@@ -178,7 +178,7 @@
35 }
36
37 Start:
38- log.Infof("Sending initial 'disconnected'.")
39+ log.Debugf("Sending initial 'disconnected'.")
40 out <- false
41 cs.lastSent = false
42 cs.currentState = cs.start()
43
44=== modified file 'bus/connectivity/webchecker.go'
45--- bus/connectivity/webchecker.go 2014-03-20 12:24:33 +0000
46+++ bus/connectivity/webchecker.go 2015-01-21 17:26:27 +0000
47@@ -64,7 +64,7 @@
48 func (wb *webchecker) Webcheck(ch chan<- bool) {
49 response, err := wb.cli.Get(wb.url)
50 if err != nil {
51- wb.log.Errorf("While GETting %s: %v", wb.url, err)
52+ wb.log.Errorf("while GETting %s: %v", wb.url, err)
53 ch <- false
54 return
55 }
56@@ -72,17 +72,17 @@
57 hash := md5.New()
58 _, err = io.CopyN(hash, response.Body, 1024)
59 if err != io.EOF {
60- wb.log.Errorf("Reading %s, expecting EOF, got: %v",
61+ wb.log.Errorf("reading %s, expecting EOF, got: %v",
62 wb.url, err)
63 ch <- false
64 return
65 }
66 sum := fmt.Sprintf("%x", hash.Sum(nil))
67 if sum == wb.target {
68- wb.log.Infof("Connectivity check passed.")
69+ wb.log.Infof("connectivity check passed.")
70 ch <- true
71 } else {
72- wb.log.Infof("Connectivity check failed: content mismatch.")
73+ wb.log.Infof("connectivity check failed: content mismatch.")
74 ch <- false
75 }
76 }
77
78=== modified file 'bus/endpoint.go'
79--- bus/endpoint.go 2014-09-08 15:48:00 +0000
80+++ bus/endpoint.go 2015-01-21 17:26:27 +0000
81@@ -110,7 +110,7 @@
82 return errors.New(msg)
83 }
84 }
85- endp.log.Infof("%#v dialed in.", name)
86+ endp.log.Debugf("%#v dialed in.", name)
87 endp.bus = bus
88 endp.proxy = bus.Object(name, dbus.ObjectPath(endp.addr.Path))
89 return nil
90
91=== modified file 'bus/systemimage/systemimage.go'
92--- bus/systemimage/systemimage.go 2014-04-02 08:46:48 +0000
93+++ bus/systemimage/systemimage.go 2015-01-21 17:26:27 +0000
94@@ -57,7 +57,7 @@
95 var _ SystemImage = &systemImage{} // ensures it conforms
96
97 func (si *systemImage) Info() (*InfoResult, error) {
98- si.log.Debugf("Invoking Info")
99+ si.log.Debugf("invoking Info")
100 res := &InfoResult{}
101 err := si.endp.Call("Info", bus.Args(), &res.BuildNumber, &res.Device, &res.Channel, &res.LastUpdate, &res.VersionDetail)
102 if err != nil {
103
104=== modified file 'client/service/postal.go'
105--- client/service/postal.go 2014-11-03 13:36:00 +0000
106+++ client/service/postal.go 2015-01-21 17:26:27 +0000
107@@ -244,7 +244,6 @@
108 for _, endp := range endps {
109 go func(name string, endp bus.Endpoint) {
110 util.NewAutoRedialer(endp).Redial()
111- svc.Log.Debugf("%s dialed in", name)
112 wg.Done()
113 }(endp.name, endp.endp)
114 }
115
116=== modified file 'client/session/session.go'
117--- client/session/session.go 2014-11-19 13:58:12 +0000
118+++ client/session/session.go 2015-01-21 17:26:27 +0000
119@@ -508,6 +508,7 @@
120 sess.proto.SetDeadline(time.Now().Add(deadAfter))
121 err = sess.proto.ReadMessage(&recv)
122 if err != nil {
123+ sess.Log.Debugf("session aborting with error on read.")
124 sess.setState(Error)
125 return err
126 }
127@@ -529,6 +530,7 @@
128 sess.Log.Errorf("server sent warning: %s", recv.Reason)
129 }
130 if err != nil {
131+ sess.Log.Debugf("session aborting with error from handler.")
132 return err
133 }
134 }
135
136=== modified file 'dependencies.tsv'
137--- dependencies.tsv 2014-08-20 12:42:51 +0000
138+++ dependencies.tsv 2015-01-21 17:26:27 +0000
139@@ -1,5 +1,5 @@
140 code.google.com/p/go-uuid hg 7dda39b2e7d5e265014674c5af696ba4186679e9 11
141 code.google.com/p/gosqlite hg 74691fb6f83716190870cde1b658538dd4b18eb0 15
142-launchpad.net/go-dbus/v1 bzr james@jamesh.id.au-20140801110939-lzfql7fk76dt6ckd 128
143+launchpad.net/go-dbus/v1 bzr jlenton@gmail.com-20141023032446-s5icvsucwlv5o38a 129
144 launchpad.net/go-xdg/v0 bzr john.lenton@canonical.com-20140208094800-gubd5md7cro3mtxa 10
145 launchpad.net/gocheck bzr gustavo@niemeyer.net-20140225173054-xu9zlkf9kxhvow02 87
146
147=== modified file 'launch_helper/kindpool.go'
148--- launch_helper/kindpool.go 2014-11-05 12:07:53 +0000
149+++ launch_helper/kindpool.go 2015-01-21 17:26:27 +0000
150@@ -296,7 +296,7 @@
151 if err != nil {
152 pool.log.Errorf("unable to read output from %v helper: %v", args.AppId, err)
153 } else {
154- pool.log.Infof("%v helper output: %#v", args.AppId, payload)
155+ pool.log.Infof("%v helper output: %s", args.AppId, payload)
156 res := &HelperResult{Input: args.Input}
157 err = json.Unmarshal(payload, &res.HelperOutput)
158 if err != nil {
159
160=== modified file 'poller/poller.go'
161--- poller/poller.go 2014-08-29 13:50:16 +0000
162+++ poller/poller.go 2015-01-21 17:26:27 +0000
163@@ -167,7 +167,7 @@
164 // the channel will produce a true for every
165 // wakeup, not only the one we asked for
166 now := time.Now()
167- p.log.Debugf("got woken up; time is %s", now)
168+ p.log.Debugf("got woken up; time is %s (𝛥: %s)", now, now.Sub(t))
169 if !now.Before(t) {
170 break
171 }

Subscribers

People subscribed via source and target branches