Don't log stacktrace in rpo$checkProfile if debugLogs is disabled (closes #27)

This commit is contained in:
Johannes Frohnmeyer 2022-10-07 00:49:19 +02:00
parent 5077197fe0
commit 15f0b2aec4
Signed by: Johannes
GPG Key ID: E76429612C2929F4
1 changed files with 3 additions and 1 deletions

View File

@ -58,7 +58,9 @@ public class ResourcePackManagerMixin {
return;
} catch (FileNotFoundException ignored) {
} catch (IOException e) {
Respackopts.LOGGER.error("Could not read respackopts config in root for " + profileName, e);
String message = "Could not read respackopts config in root for " + profileName;
if (RespackoptsConfig.debugLogs) Respackopts.LOGGER.error(message, e);
else Respackopts.LOGGER.error(message);
}
Identifier confId = new Identifier(Respackopts.ID, "conf.json");