From 3068b2f76f2079bb9132ac1e1f04f5d96e12ebe5 Mon Sep 17 00:00:00 2001 From: bfabricio Date: Wed, 8 Jan 2025 09:42:32 -0300 Subject: [PATCH] DEVOPS-30603: improve copy schema migration logging --- pkg/pgctl/pgctl.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/pgctl/pgctl.go b/pkg/pgctl/pgctl.go index 41472bef..60b17762 100644 --- a/pkg/pgctl/pgctl.go +++ b/pkg/pgctl/pgctl.go @@ -376,12 +376,11 @@ func (s *copy_schema_state) Execute() (State, error) { restoreExec := restore.Exec(dumpExec.FileName, ExecOptions{StreamPrint: true}) if restoreExec.Error != nil { - log.Error(restoreExec.Error.Err, "restore failed") - + log.Error(restoreExec.Error.Err, "restore failed", "cmd output", restoreExec.Error.CmdOutput) // Attempt to drop schemas after restore failure. dropResult := restore.DropSchemas() if dropResult.Error != nil { - log.Error(dropResult.Error.Err, "failed to drop schemas") + log.Error(dropResult.Error.Err, "failed to drop schemas", "cmd output", dropResult.Error.CmdOutput) return nil, dropResult.Error.Err }