Merge lp://staging/~dimitern/juju-core/032-deuglify-logging-for-main-packages into lp://staging/~juju/juju-core/trunk
Proposed by
Dimiter Naydenov
Status: | Merged |
---|---|
Merged at revision: | 1149 |
Proposed branch: | lp://staging/~dimitern/juju-core/032-deuglify-logging-for-main-packages |
Merge into: | lp://staging/~juju/juju-core/trunk |
Diff against target: |
481 lines (+49/-59) 12 files modified
cmd/juju/main_test.go (+2/-2) cmd/juju/publish.go (+5/-5) cmd/juju/ssh.go (+2/-2) cmd/juju/synctools.go (+6/-6) cmd/jujud/agent.go (+7/-7) cmd/jujud/machine.go (+6/-6) cmd/jujud/unit.go (+1/-1) cmd/jujud/upgrade.go (+11/-11) cmd/logging.go (+1/-8) cmd/logging_test.go (+7/-7) cmd/supercommand.go (+0/-3) cmd/supercommand_test.go (+1/-1) |
To merge this branch: | bzr merge lp://staging/~dimitern/juju-core/032-deuglify-logging-for-main-packages |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Engineering | Pending | ||
Review via email: mp+158445@code.staging.launchpad.net |
Description of the change
deuglify logging for main packages.
Removed "cmd/juju*: " badge from all commands.
Also remove the "JUJU:" prefix and the automatic
command prefix and name which was just repeating
what's already in the message itself.
So now, instead of:
ERROR JUJU:jujutest:blah jujutest blah command failed: BAM!
ERROR JUJU:juju:bootstrap juju bootstrap command failed: dummy.Bootstrap is broken
INFO JUJU:test hello
We'll have just:
ERROR command failed: BAM!
INFO hello
ERROR command failed: dummy.Bootstrap is broken
The timestamp with format like 2013/04/12 09:59:16
is still there, before the message.
To post a comment you must log in.
Reviewers: mp+158445_ code.launchpad. net,
Message:
Please take a look.
Description:
deuglify logging for main packages.
Removed "cmd/juju*: " badge from all commands.
https:/ /code.launchpad .net/~dimitern/ juju-core/ 032-deuglify- logging- for-main- packages/ +merge/ 158445
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/8674043/
Affected files: synctools. go machine. go jujud/unit. go upgrade. go
A [revision details]
M cmd/juju/publish.go
M cmd/juju/ssh.go
M cmd/juju/
M cmd/jujud/agent.go
M cmd/jujud/
cmd/
M cmd/jujud/
Index: [revision details]
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision:
<email address hidden>
+New revision:
<email address hidden>
Index: cmd/juju/publish.go publish. go' "cmd/juju: local digest is %s", localDigest)
=== modified file 'cmd/juju/
--- cmd/juju/publish.go 2013-04-09 18:52:24 +0000
+++ cmd/juju/publish.go 2013-04-11 17:51:37 +0000
@@ -117,7 +117,7 @@
if err != nil {
return fmt.Errorf("cannot obtain local digest: %v", err)
}
- log.Infof(
+ log.Infof("local digest is %s", localDigest)
ch, err := charm.ReadDir( branch. Location( )) NotFoundError) ; ok { Event(curl, "") NotFoundError) ; ok { "cmd/juju: charm %s is not yet in the store", curl)
if err != nil {
@@ -131,7 +131,7 @@
if _, ok := err.(*charm.
oldEvent, err = charm.Store.
if _, ok := err.(*charm.
- log.Infof(
+ log.Infof("charm %s is not yet in the store", curl)
err = nil
}
}
@@ -143,13 +143,13 @@
return handleEvent(ctx, curl, oldEvent)
}
- log.Infof( "cmd/juju: sending charm to the charm store...")
+ log.Infof("sending charm to the charm store...")
err = branch. Push(&bzr. PushAttr{ Location: pushLocation, Remember: true}) "cmd/juju: charm sent; waiting for it to be published...") Sleep(c. pollDelay) Event(curl, "") on(event. Revision) "cmd/juju: charm published at %s as %s", event.Time, curlRev) Fprintln( ctx.Stdout, curlRev) Join(event. Errors, "; "))
if err != nil {
return err
}
- log.Infof(
+ log.Infof("charm sent; waiting for it to be published...")
for {
time.
newEvent, err := charm.Store.
@@ -175,7 +175,7 @@
switch event.Kind {
case "published":
curlRev := curl.WithRevisi
- log.Infof(
+ log.Infof("charm published at %s as %s", event.Time, curlRev)
fmt.
case "publish-error":
return fmt.Errorf("charm could not be published: %s",
strings.
Index: cmd/juju/ssh.go target string) (string, error) { Id(target) { "cmd/juju: looking up address for machine %s...", target) PublicAddress( ) ? Address( target)
=== modified file 'cmd/juju/ssh.go'
--- cmd/juju/ssh.go 2013-03-27 15:42:49 +0000
+++ cmd/juju/ssh.go 2013-04-11 17:51:37 +0000
@@ -72,13 +72,13 @@
func (c *SSHCommon) hostFromTarget(
// is the target the id of a machine ?
if state.IsMachine
- log.Infof(
+ log.Infof("looking up address for machine %s...", target)
// TODO(dfc) maybe we should have machine.
return c.machinePublic
}
// maybe the targe...