From 860cae2bd41fe8f6ef651af047fb66748c15aa5f Mon Sep 17 00:00:00 2001 From: Alex Steel <130377221+asteel-gsa@users.noreply.github.com> Date: Tue, 28 May 2024 08:42:31 -0400 Subject: [PATCH] Change logging --- cmd/s3_to_db.go | 1 + internal/pipes/pg_restore.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/s3_to_db.go b/cmd/s3_to_db.go index a9d4e91..9430b21 100644 --- a/cmd/s3_to_db.go +++ b/cmd/s3_to_db.go @@ -129,6 +129,7 @@ func bucket_to_cgov_tables( pg_restore := pipes.PG_Restore(db_creds, schema, table) restoreOut, restoreError := pg_restore.String() util.ErrorCheck(restoreOut, restoreError) + logging.Logger.Printf("RESTORE of table %s complete.", table) os.Remove(fmt.Sprintf("./pg_dump_tables/%s", dump_file_name)) logging.Logger.Printf("REMOVING FILE: %s", dump_file_name) diff --git a/internal/pipes/pg_restore.go b/internal/pipes/pg_restore.go index 4d3000f..7360d72 100644 --- a/internal/pipes/pg_restore.go +++ b/internal/pipes/pg_restore.go @@ -33,7 +33,7 @@ func PG_Restore(creds vcap.Credentials, schema string, table string) *script.Pip // Combine the slice for printing and execution. combined := strings.Join(cmd[:], " ") logging.Logger.Printf("RESTORE "+util.PGRESTORE_path+" targeting %s.%s\n", schema, table) - logging.Logger.Printf("CALLING COMMAND: " + combined) + //logging.Logger.Printf("CALLING COMMAND: " + combined) if util.IsDebugLevel("DEBUG") { fmt.Printf("command: %s\n", combined) }