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
=== modified file 'bus/connectivity/connectivity.go'
--- bus/connectivity/connectivity.go 2014-07-04 19:12:38 +0000
+++ bus/connectivity/connectivity.go 2015-01-21 17:26:27 +0000
@@ -82,7 +82,7 @@
82 // Get the current state.82 // Get the current state.
83 initial = nm.GetState()83 initial = nm.GetState()
84 if initial == networkmanager.Unknown {84 if initial == networkmanager.Unknown {
85 cs.log.Debugf("Failed to get state.")85 cs.log.Debugf("failed to get state.")
86 goto Continue86 goto Continue
87 }87 }
88 cs.log.Debugf("got initial state of %s", initial)88 cs.log.Debugf("got initial state of %s", initial)
@@ -143,17 +143,17 @@
143143
144 case <-cs.timer.C:144 case <-cs.timer.C:
145 if cs.currentState == networkmanager.ConnectedGlobal {145 if cs.currentState == networkmanager.ConnectedGlobal {
146 log.Debugf("May be connected; checking...")146 log.Debugf("may be connected; checking...")
147 cs.webgetCh = make(chan bool)147 cs.webgetCh = make(chan bool)
148 go cs.webget(cs.webgetCh)148 go cs.webget(cs.webgetCh)
149 }149 }
150150
151 case connected := <-cs.webgetCh:151 case connected := <-cs.webgetCh:
152 cs.timer.Reset(recheckTimeout)152 cs.timer.Reset(recheckTimeout)
153 log.Debugf("Connection check says: %t", connected)153 log.Debugf("connection check says: %t", connected)
154 cs.webgetCh = nil154 cs.webgetCh = nil
155 if connected && cs.lastSent == false {155 if connected && cs.lastSent == false {
156 log.Infof("Sending 'connected'.")156 log.Debugf("sending 'connected'.")
157 cs.lastSent = true157 cs.lastSent = true
158 break Loop158 break Loop
159 }159 }
@@ -178,7 +178,7 @@
178 }178 }
179179
180Start:180Start:
181 log.Infof("Sending initial 'disconnected'.")181 log.Debugf("Sending initial 'disconnected'.")
182 out <- false182 out <- false
183 cs.lastSent = false183 cs.lastSent = false
184 cs.currentState = cs.start()184 cs.currentState = cs.start()
185185
=== modified file 'bus/connectivity/webchecker.go'
--- bus/connectivity/webchecker.go 2014-03-20 12:24:33 +0000
+++ bus/connectivity/webchecker.go 2015-01-21 17:26:27 +0000
@@ -64,7 +64,7 @@
64func (wb *webchecker) Webcheck(ch chan<- bool) {64func (wb *webchecker) Webcheck(ch chan<- bool) {
65 response, err := wb.cli.Get(wb.url)65 response, err := wb.cli.Get(wb.url)
66 if err != nil {66 if err != nil {
67 wb.log.Errorf("While GETting %s: %v", wb.url, err)67 wb.log.Errorf("while GETting %s: %v", wb.url, err)
68 ch <- false68 ch <- false
69 return69 return
70 }70 }
@@ -72,17 +72,17 @@
72 hash := md5.New()72 hash := md5.New()
73 _, err = io.CopyN(hash, response.Body, 1024)73 _, err = io.CopyN(hash, response.Body, 1024)
74 if err != io.EOF {74 if err != io.EOF {
75 wb.log.Errorf("Reading %s, expecting EOF, got: %v",75 wb.log.Errorf("reading %s, expecting EOF, got: %v",
76 wb.url, err)76 wb.url, err)
77 ch <- false77 ch <- false
78 return78 return
79 }79 }
80 sum := fmt.Sprintf("%x", hash.Sum(nil))80 sum := fmt.Sprintf("%x", hash.Sum(nil))
81 if sum == wb.target {81 if sum == wb.target {
82 wb.log.Infof("Connectivity check passed.")82 wb.log.Infof("connectivity check passed.")
83 ch <- true83 ch <- true
84 } else {84 } else {
85 wb.log.Infof("Connectivity check failed: content mismatch.")85 wb.log.Infof("connectivity check failed: content mismatch.")
86 ch <- false86 ch <- false
87 }87 }
88}88}
8989
=== modified file 'bus/endpoint.go'
--- bus/endpoint.go 2014-09-08 15:48:00 +0000
+++ bus/endpoint.go 2015-01-21 17:26:27 +0000
@@ -110,7 +110,7 @@
110 return errors.New(msg)110 return errors.New(msg)
111 }111 }
112 }112 }
113 endp.log.Infof("%#v dialed in.", name)113 endp.log.Debugf("%#v dialed in.", name)
114 endp.bus = bus114 endp.bus = bus
115 endp.proxy = bus.Object(name, dbus.ObjectPath(endp.addr.Path))115 endp.proxy = bus.Object(name, dbus.ObjectPath(endp.addr.Path))
116 return nil116 return nil
117117
=== modified file 'bus/systemimage/systemimage.go'
--- bus/systemimage/systemimage.go 2014-04-02 08:46:48 +0000
+++ bus/systemimage/systemimage.go 2015-01-21 17:26:27 +0000
@@ -57,7 +57,7 @@
57var _ SystemImage = &systemImage{} // ensures it conforms57var _ SystemImage = &systemImage{} // ensures it conforms
5858
59func (si *systemImage) Info() (*InfoResult, error) {59func (si *systemImage) Info() (*InfoResult, error) {
60 si.log.Debugf("Invoking Info")60 si.log.Debugf("invoking Info")
61 res := &InfoResult{}61 res := &InfoResult{}
62 err := si.endp.Call("Info", bus.Args(), &res.BuildNumber, &res.Device, &res.Channel, &res.LastUpdate, &res.VersionDetail)62 err := si.endp.Call("Info", bus.Args(), &res.BuildNumber, &res.Device, &res.Channel, &res.LastUpdate, &res.VersionDetail)
63 if err != nil {63 if err != nil {
6464
=== modified file 'client/service/postal.go'
--- client/service/postal.go 2014-11-03 13:36:00 +0000
+++ client/service/postal.go 2015-01-21 17:26:27 +0000
@@ -244,7 +244,6 @@
244 for _, endp := range endps {244 for _, endp := range endps {
245 go func(name string, endp bus.Endpoint) {245 go func(name string, endp bus.Endpoint) {
246 util.NewAutoRedialer(endp).Redial()246 util.NewAutoRedialer(endp).Redial()
247 svc.Log.Debugf("%s dialed in", name)
248 wg.Done()247 wg.Done()
249 }(endp.name, endp.endp)248 }(endp.name, endp.endp)
250 }249 }
251250
=== modified file 'client/session/session.go'
--- client/session/session.go 2014-11-19 13:58:12 +0000
+++ client/session/session.go 2015-01-21 17:26:27 +0000
@@ -508,6 +508,7 @@
508 sess.proto.SetDeadline(time.Now().Add(deadAfter))508 sess.proto.SetDeadline(time.Now().Add(deadAfter))
509 err = sess.proto.ReadMessage(&recv)509 err = sess.proto.ReadMessage(&recv)
510 if err != nil {510 if err != nil {
511 sess.Log.Debugf("session aborting with error on read.")
511 sess.setState(Error)512 sess.setState(Error)
512 return err513 return err
513 }514 }
@@ -529,6 +530,7 @@
529 sess.Log.Errorf("server sent warning: %s", recv.Reason)530 sess.Log.Errorf("server sent warning: %s", recv.Reason)
530 }531 }
531 if err != nil {532 if err != nil {
533 sess.Log.Debugf("session aborting with error from handler.")
532 return err534 return err
533 }535 }
534 }536 }
535537
=== modified file 'dependencies.tsv'
--- dependencies.tsv 2014-08-20 12:42:51 +0000
+++ dependencies.tsv 2015-01-21 17:26:27 +0000
@@ -1,5 +1,5 @@
1code.google.com/p/go-uuid hg 7dda39b2e7d5e265014674c5af696ba4186679e9 111code.google.com/p/go-uuid hg 7dda39b2e7d5e265014674c5af696ba4186679e9 11
2code.google.com/p/gosqlite hg 74691fb6f83716190870cde1b658538dd4b18eb0 152code.google.com/p/gosqlite hg 74691fb6f83716190870cde1b658538dd4b18eb0 15
3launchpad.net/go-dbus/v1 bzr james@jamesh.id.au-20140801110939-lzfql7fk76dt6ckd 1283launchpad.net/go-dbus/v1 bzr jlenton@gmail.com-20141023032446-s5icvsucwlv5o38a 129
4launchpad.net/go-xdg/v0 bzr john.lenton@canonical.com-20140208094800-gubd5md7cro3mtxa 104launchpad.net/go-xdg/v0 bzr john.lenton@canonical.com-20140208094800-gubd5md7cro3mtxa 10
5launchpad.net/gocheck bzr gustavo@niemeyer.net-20140225173054-xu9zlkf9kxhvow02 875launchpad.net/gocheck bzr gustavo@niemeyer.net-20140225173054-xu9zlkf9kxhvow02 87
66
=== modified file 'launch_helper/kindpool.go'
--- launch_helper/kindpool.go 2014-11-05 12:07:53 +0000
+++ launch_helper/kindpool.go 2015-01-21 17:26:27 +0000
@@ -296,7 +296,7 @@
296 if err != nil {296 if err != nil {
297 pool.log.Errorf("unable to read output from %v helper: %v", args.AppId, err)297 pool.log.Errorf("unable to read output from %v helper: %v", args.AppId, err)
298 } else {298 } else {
299 pool.log.Infof("%v helper output: %#v", args.AppId, payload)299 pool.log.Infof("%v helper output: %s", args.AppId, payload)
300 res := &HelperResult{Input: args.Input}300 res := &HelperResult{Input: args.Input}
301 err = json.Unmarshal(payload, &res.HelperOutput)301 err = json.Unmarshal(payload, &res.HelperOutput)
302 if err != nil {302 if err != nil {
303303
=== modified file 'poller/poller.go'
--- poller/poller.go 2014-08-29 13:50:16 +0000
+++ poller/poller.go 2015-01-21 17:26:27 +0000
@@ -167,7 +167,7 @@
167 // the channel will produce a true for every167 // the channel will produce a true for every
168 // wakeup, not only the one we asked for168 // wakeup, not only the one we asked for
169 now := time.Now()169 now := time.Now()
170 p.log.Debugf("got woken up; time is %s", now)170 p.log.Debugf("got woken up; time is %s (𝛥: %s)", now, now.Sub(t))
171 if !now.Before(t) {171 if !now.Before(t) {
172 break172 break
173 }173 }

Subscribers

People subscribed via source and target branches