chore: add more info-level logging around patch downloads (#267)

This commit is contained in:
Bryan Oltman
2025-02-07 14:07:19 -05:00
committed by GitHub
parent 4ca08d31bf
commit 67f8643242
2 changed files with 3 additions and 4 deletions
+2 -2
View File
@@ -222,7 +222,7 @@ pub fn download_to_path(
url: &str,
path: &Path,
) -> anyhow::Result<()> {
shorebird_debug!("Downloading patch from: {}", url);
shorebird_info!("Downloading patch from: {}", url);
// Download the file at the given url to the given path.
let download_file_hook = network_hooks.download_file_fn;
let bytes = download_file_hook(url)?;
@@ -233,7 +233,7 @@ pub fn download_to_path(
.with_context(|| format!("create_dir_all failed for {}", parent.display()))?;
}
shorebird_debug!("Writing download to: {:?}", path);
shorebird_info!("Writing patch to: {:?}", path);
let mut file = File::create(path)?;
file.write_all(&bytes)?;
Ok(())
+1 -2
View File
@@ -495,12 +495,11 @@ where
{
use comde::de::Decompressor;
use comde::zstd::ZstdDecompressor;
shorebird_debug!("Patch is compressed, inflating...");
use std::io::{BufReader, BufWriter};
// Open all our files first for error clarity. Otherwise we might see
// PipeReader/Writer errors instead of file open errors.
shorebird_debug!("Reading patch file: {:?}", patch_path);
shorebird_info!("Inflating patch from {:?}", patch_path);
let compressed_patch_r = BufReader::new(
fs::File::open(patch_path)
.context(format!("Failed to open patch file: {:?}", patch_path))?,