Merge lp:~chipaca/ubuntu-push/logging-is-for-the-birds-tweet-tweet into lp:ubuntu-push/automatic

Proposed by John Lenton
Status: Merged
Approved by: John Lenton
Approved revision: 345
Merged at revision: 350
Proposed branch: lp:~chipaca/ubuntu-push/logging-is-for-the-birds-tweet-tweet
Merge into: lp:ubuntu-push/automatic
Diff against target: 88 lines (+10/-10)
4 files modified
client/session/session.go (+3/-3)
debian/config.json (+1/-1)
launch_helper/kindpool.go (+3/-2)
launch_helper/legacy/legacy.go (+3/-4)
To merge this branch: bzr merge lp:~chipaca/ubuntu-push/logging-is-for-the-birds-tweet-tweet
Reviewer Review Type Date Requested Status
Samuele Pedroni Approve
Review via email: mp+240713@code.launchpad.net

Commit message

move logging to info; improve logging of legacy helper errors; switch some logs to error from debug

Description of the change

move logging to info; improve logging of legacy helper errors; switch some logs to error from debug

To post a comment you must log in.
Revision history for this message
Samuele Pedroni (pedronis) wrote :

looks good

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'client/session/session.go'
--- client/session/session.go 2014-10-08 20:35:24 +0000
+++ client/session/session.go 2014-11-05 12:16:21 +0000
@@ -430,7 +430,7 @@
430 return err430 return err
431 }431 }
432 sess.clearShouldDelay()432 sess.clearShouldDelay()
433 sess.Log.Debugf("broadcast chan:%v app:%v topLevel:%d payloads:%s",433 sess.Log.Infof("broadcast chan:%v app:%v topLevel:%d payloads:%s",
434 bcast.ChanId, bcast.AppId, bcast.TopLevel, bcast.Payloads)434 bcast.ChanId, bcast.AppId, bcast.TopLevel, bcast.Payloads)
435 if bcast.ChanId == protocol.SystemChannelId {435 if bcast.ChanId == protocol.SystemChannelId {
436 // the system channel id, the only one we care about for now436 // the system channel id, the only one we care about for now
@@ -438,7 +438,7 @@
438 sess.BroadcastCh <- sess.decodeBroadcast(bcast)438 sess.BroadcastCh <- sess.decodeBroadcast(bcast)
439 sess.Log.Debugf("sent bcast over")439 sess.Log.Debugf("sent bcast over")
440 } else {440 } else {
441 sess.Log.Debugf("what is this weird channel, %#v?", bcast.ChanId)441 sess.Log.Errorf("what is this weird channel, %#v?", bcast.ChanId)
442 }442 }
443 return nil443 return nil
444}444}
@@ -468,7 +468,7 @@
468 if to == nil {468 if to == nil {
469 continue469 continue
470 }470 }
471 sess.Log.Debugf("unicast app:%v msg:%s payload:%s",471 sess.Log.Infof("unicast app:%v msg:%s payload:%s",
472 notif.AppId, notif.MsgId, notif.Payload)472 notif.AppId, notif.MsgId, notif.Payload)
473 sess.Log.Debugf("sending ucast over")473 sess.Log.Debugf("sending ucast over")
474 sess.NotificationsCh <- AddressedNotification{to, notif}474 sess.NotificationsCh <- AddressedNotification{to, notif}
475475
=== modified file 'debian/config.json'
--- debian/config.json 2014-08-21 10:47:12 +0000
+++ debian/config.json 2014-11-05 12:16:21 +0000
@@ -12,7 +12,7 @@
12 "recheck_timeout": "10m",12 "recheck_timeout": "10m",
13 "connectivity_check_url": "http://start.ubuntu.com/connectivity-check.html",13 "connectivity_check_url": "http://start.ubuntu.com/connectivity-check.html",
14 "connectivity_check_md5": "4589f42e1546aa47ca181e5d949d310b",14 "connectivity_check_md5": "4589f42e1546aa47ca181e5d949d310b",
15 "log_level": "debug",15 "log_level": "info",
16 "fallback_vibration": {"pattern": [100, 100], "repeat": 2},16 "fallback_vibration": {"pattern": [100, 100], "repeat": 2},
17 "fallback_sound": "sounds/ubuntu/notifications/Slick.ogg",17 "fallback_sound": "sounds/ubuntu/notifications/Slick.ogg",
18 "poll_interval": "5m",18 "poll_interval": "5m",
1919
=== modified file 'launch_helper/kindpool.go'
--- launch_helper/kindpool.go 2014-08-20 12:42:51 +0000
+++ launch_helper/kindpool.go 2014-11-05 12:16:21 +0000
@@ -294,12 +294,13 @@
294 }294 }
295 payload, err := ioutil.ReadFile(args.FileOut)295 payload, err := ioutil.ReadFile(args.FileOut)
296 if err != nil {296 if err != nil {
297 pool.log.Errorf("unable to read output from helper: %v", 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 res := &HelperResult{Input: args.Input}300 res := &HelperResult{Input: args.Input}
300 err = json.Unmarshal(payload, &res.HelperOutput)301 err = json.Unmarshal(payload, &res.HelperOutput)
301 if err != nil {302 if err != nil {
302 pool.log.Debugf("failed to parse HelperOutput from helper output: %v", err)303 pool.log.Errorf("failed to parse HelperOutput from %v helper output: %v", args.AppId, err)
303 } else {304 } else {
304 pool.chOut <- res305 pool.chOut <- res
305 }306 }
306307
=== modified file 'launch_helper/legacy/legacy.go'
--- launch_helper/legacy/legacy.go 2014-08-21 18:03:49 +0000
+++ launch_helper/legacy/legacy.go 2014-11-05 12:16:21 +0000
@@ -55,7 +55,7 @@
55 err error55 err error
56}56}
5757
58func (lhl *legacyHelperLauncher) Launch(_, progname, f1, f2 string) (string, error) {58func (lhl *legacyHelperLauncher) Launch(appId, progname, f1, f2 string) (string, error) {
59 comm := make(chan msg)59 comm := make(chan msg)
6060
61 go func() {61 go func() {
@@ -78,9 +78,8 @@
78 p_err := cmd.Wait()78 p_err := cmd.Wait()
79 if p_err != nil {79 if p_err != nil {
80 // Helper failed or got killed, log output/errors80 // Helper failed or got killed, log output/errors
81 lhl.log.Errorf("Legacy helper failed: %v", p_err)81 lhl.log.Errorf("Legacy helper failed: appId: %v, helper: %v, pid: %v, error: %v, stdout: %#v, stderr: %#v.",
82 lhl.log.Errorf("Legacy helper failed. Stdout: %s", stdout)82 appId, progname, id, p_err, stdout.String(), stderr.String())
83 lhl.log.Errorf("Legacy helper failed. Stderr: %s", stderr)
84 }83 }
85 lhl.done(id)84 lhl.done(id)
86 }()85 }()

Subscribers

People subscribed via source and target branches