chore: add more info-level logging around patch downloads (#267)
This commit is contained in:
@@ -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(())
|
||||
|
||||
@@ -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))?,
|
||||
|
||||
Reference in New Issue
Block a user