chore: improve rmcl diagnostic logging

This commit is contained in:
objz committed 2026-06-16 10:22:51 +02:00
1 parent a58e6fb76d
commit 09bc8f26fb
23 files changed
+925 -61

No files matched your search

+24
View File
@@ -26,7 +26,16 @@ impl ModLoaderInstaller for FabricInstaller {
client: &HttpClient,
game_version: &str,
) -> Result<Vec<String>, NetError> {
tracing::debug!(
"Fetching Fabric loader versions for Minecraft {}",
game_version
);
let loader_versions = fabric_api::fetch_fabric_versions(client, game_version).await?;
tracing::debug!(
"Fetched {} Fabric loader version(s) for Minecraft {}",
loader_versions.len(),
game_version
);
Ok(loader_versions
.into_iter()
.map(|lv| lv.loader.version)
@@ -41,14 +50,29 @@ impl ModLoaderInstaller for FabricInstaller {
_instance_dir: &Path,
meta_dir: &Path,
) -> Result<(), NetError> {
tracing::info!(
"Installing Fabric {} for Minecraft {}",
loader_version,
game_version
);
let (profile, raw_bytes) =
fabric_api::fetch_fabric_profile_with_raw(client, game_version, loader_version).await?;
tracing::debug!(
"Fetched Fabric profile {} with {} libraries",
profile.id,
profile.libraries.len()
);
fabric_api::download_fabric_libraries(client, &profile, meta_dir).await?;
super::save_profile_bytes(
meta_dir,
&format!("fabric-{game_version}-{loader_version}.json"),
&raw_bytes,
)?;
tracing::debug!(
"Saved Fabric profile for Minecraft {} loader {}",
game_version,
loader_version
);
Ok(())
}
}