Skip to content

Commit

Permalink
improve snapshot logging
Browse files Browse the repository at this point in the history
  • Loading branch information
mschuchard committed Aug 8, 2024
1 parent 13572e4 commit dfc48c9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 1.1.2 (Next)
- Add version flag
- Add random number string to default snapshot filename suffix for uniqueness.

### 1.1.1
- Fix invalid CLI argument character for HCL file value.
- Fix empty env settings for insecure and cleanup.
Expand Down
4 changes: 3 additions & 1 deletion vault/snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func VaultRaftSnapshot(client *vault.Client, snapshotPath string) (*os.File, err
// prepare snapshot file for content writing
snapshotFile, err := os.OpenFile(snapshotPath, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0o600)
if err != nil {
log.Printf("snapshot file at %s could not be created or opened", snapshotPath)
log.Printf("snapshot file at '%s' could not be created or opened", snapshotPath)
return nil, err
}

Expand All @@ -30,5 +30,7 @@ func VaultRaftSnapshot(client *vault.Client, snapshotPath string) (*os.File, err
return nil, err
}

log.Printf("snapshot file created on local filesystem at '%s'", snapshotFile.Name())

return snapshotFile, err
}

0 comments on commit dfc48c9

Please sign in to comment.