-
Notifications
You must be signed in to change notification settings - Fork 57
Consistent log messages #120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -399,7 +399,6 @@ func checkFlags(cmd *cobra.Command) error { | |||
func main() { | |||
err := rootCmd.Execute() | |||
if err != nil { | |||
fmt.Fprintf(os.Stderr, "Error occurred: %v\n", err) | |||
os.Exit(1) | |||
glog.Fatalf("Error occurred: %v", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
cmd/manager/main.go
Outdated
@@ -44,7 +44,7 @@ func main() { | |||
glog.Fatal(err) | |||
} | |||
|
|||
glog.Infof("Registering Components.") | |||
glog.Info("Registering Components.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without the dot at the end please
cmd/manager/main.go
Outdated
@@ -61,10 +61,13 @@ func main() { | |||
glog.Fatal(err) | |||
} | |||
|
|||
glog.Infof("Starting the Cmd.") | |||
glog.Info("Starting the Cmd.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without the dot at the end please
@@ -109,7 +109,7 @@ func (a *Actuator) handleMachineError(machine *machinev1.Machine, err *apierrors | |||
|
|||
// Create creates a machine and is invoked by the Machine Controller | |||
func (a *Actuator) Create(context context.Context, cluster *machinev1.Cluster, machine *machinev1.Machine) error { | |||
glog.Infof("Creating machine %q", machine.Name) | |||
glog.Infof("Creating machine %v", machine.Name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/%v/%q
, names with %q
@@ -149,7 +149,7 @@ func (a *Actuator) Create(context context.Context, cluster *machinev1.Cluster, m | |||
|
|||
// Delete deletes a machine and is invoked by the Machine Controller | |||
func (a *Actuator) Delete(context context.Context, cluster *machinev1.Cluster, machine *machinev1.Machine) error { | |||
glog.Infof("Deleting machine %q", machine.Name) | |||
glog.Infof("Deleting machine %v", machine.Name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/%v/%q
, names with %q
@@ -373,7 +373,7 @@ func (a *Actuator) applyMachineStatus( | |||
return nil | |||
} | |||
|
|||
glog.Infof("Machine %s status has changed: %s", machine.Name, diff.ObjectReflectDiff(machine.Status, machineCopy.Status)) | |||
glog.Infof("Machine %s status has changed: %v", machine.Name, diff.ObjectReflectDiff(machine.Status, machineCopy.Status)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/%s/%q
, names with %q
pkg/cloud/libvirt/client/domain.go
Outdated
diskVolume, err := virConn.LookupStorageVolByKey(volumeKey) | ||
if err != nil { | ||
return fmt.Errorf("Can't retrieve volume %s", volumeKey) | ||
} | ||
glog.Infof("diskVolume") | ||
glog.Info("diskVolume") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strange log messages. Maybe Getting disk volume
or similar.
pkg/cloud/libvirt/client/domain.go
Outdated
@@ -267,18 +267,18 @@ func randomWWN(strlen int) string { | |||
|
|||
func setDisks(domainDef *libvirtxml.Domain, virConn *libvirt.Connect, volumeKey string) error { | |||
disk := newDefDisk(0) | |||
glog.Infof("LookupStorageVolByKey") | |||
glog.Info("LookupStorageVolByKey") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather Looking up storage volume by key
pkg/cloud/libvirt/client/domain.go
Outdated
diskVolumeFile, err := diskVolume.GetPath() | ||
if err != nil { | ||
return fmt.Errorf("Error retrieving volume file: %s", err) | ||
} | ||
|
||
glog.Infof("DomainDiskSource") | ||
glog.Info("DomainDiskSource") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Constructing domain disk source
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ingvagabund The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
/retest Please review the full test history for this PR and help us cut down flakes. |
Based on openshift/machine-api-operator#231
/assign @ingvagabund