Skip to content
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

add more logging at default level #153

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/migrator/migrator.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func main() {
pflag.CommandLine.AddGoFlagSet(goflag.CommandLine)
pflag.Parse()
pflag.VisitAll(func(flag *pflag.Flag) {
glog.V(4).Infof("FLAG: --%s=%q", flag.Name, flag.Value)
glog.V(2).Infof("FLAG: --%s=%q", flag.Name, flag.Value)
})
command := app.NewMigratorCommand()
if err := command.Execute(); err != nil {
Expand Down
3 changes: 3 additions & 0 deletions pkg/controller/kubemigrator.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ func (km *KubeMigrator) processOne(obj interface{}) error {
return nil
}
m, err = km.updateStatus(m, migrationv1alpha1.MigrationRunning, "")
glog.V(2).Infof("Running: %v", m.Name)
if err != nil {
return err
}
Expand All @@ -120,10 +121,12 @@ func (km *KubeMigrator) processOne(obj interface{}) error {
utilruntime.HandleError(err)
if err == nil {
_, err = km.updateStatus(m, migrationv1alpha1.MigrationSucceeded, "")
glog.V(2).Infof("Succeeded: %v", m.Name)
metrics.Metrics.ObserveSucceededMigration(resource(m).String())
return err
}
_, err = km.updateStatus(m, migrationv1alpha1.MigrationFailed, err.Error())
glog.V(2).Infof("Failed: %v", m.Name)
metrics.Metrics.ObserveFailedMigration(resource(m).String())
return err
}
Expand Down