From e4a5f9ab4ca2c340acedddd429c7b382ec8a33f1 Mon Sep 17 00:00:00 2001 From: Fabricio Bottega Date: Wed, 8 Jan 2025 12:38:49 -0300 Subject: [PATCH] DEVOPS-30603: improve copy schema migration logging (#389) --- 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 }