Skip to content

Commit 70c93e0

Browse files
authored
modrinth: debug log modpack index content (#471)
1 parent 1627f7d commit 70c93e0

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/main/java/me/itzg/helpers/modrinth/ModrinthPackInstaller.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import me.itzg.helpers.json.ObjectMappers;
2828
import me.itzg.helpers.modrinth.model.DependencyId;
2929
import me.itzg.helpers.modrinth.model.ModpackIndex;
30+
import me.itzg.helpers.modrinth.model.ModpackIndex.ModpackFile;
3031
import me.itzg.helpers.quilt.QuiltInstaller;
3132
import org.jetbrains.annotations.Blocking;
3233
import org.jetbrains.annotations.VisibleForTesting;
@@ -99,6 +100,10 @@ public Mono<Installation> processModpack(SharedFetch sharedFetch) {
99100
);
100101
}
101102

103+
if (log.isDebugEnabled()) {
104+
debugLogModpackIndex(modpackIndex);
105+
}
106+
102107
if (!Objects.equals("minecraft", modpackIndex.getGame())) {
103108
return Mono.error(
104109
new InvalidParameterException(
@@ -126,6 +131,15 @@ public Mono<Installation> processModpack(SharedFetch sharedFetch) {
126131
);
127132
}
128133

134+
private void debugLogModpackIndex(ModpackIndex modpackIndex) {
135+
log.debug("Modpack index: name={}, game={}, versionId={}",
136+
modpackIndex.getName(), modpackIndex.getGame(), modpackIndex.getVersionId()
137+
);
138+
for (final ModpackFile file : modpackIndex.getFiles()) {
139+
log.debug("Modpack file: path={}, env={}", file.getPath(), file.getEnv());
140+
}
141+
}
142+
129143
private Flux<Path> processModFiles(ModpackIndex modpackIndex) {
130144
return Flux.fromStream(
131145
modpackIndex.getFiles().stream()

0 commit comments

Comments
 (0)