Lowered log level of some spammy messages in config system to Debug (closes #81)

This commit is contained in:
bdew committed 2015-02-18 12:14:25 +02:00
1 parent 0a75b46341
commit 63c9107e14
7 files changed
+32 -32

No files matched your search

+1 -1
View File
@@ -23,7 +23,7 @@ apply plugin: 'scala'
apply plugin: 'forge'
version = "1.4.6"
ext.bdlibver = "1.6.2.41"
ext.bdlibver = "1.6.3.42"
ext.versuffix = "mc1710"
ext.apiVer = version
+1
View File
@@ -43,6 +43,7 @@ object Gendustry {
var configDir: File = null
def logDebug(msg: String, args: Any*) = log.debug(msg.format(args: _*))
def logInfo(msg: String, args: Any*) = log.info(msg.format(args: _*))
def logWarn(msg: String, args: Any*) = log.warn(msg.format(args: _*))
def logError(msg: String, args: Any*) = log.error(msg.format(args: _*))
+2 -2
View File
@@ -31,10 +31,10 @@ object Fluids extends FluidManager {
isGaseous: Boolean = false): Fluid = {
val ownFluid = if (FluidRegistry.isFluidRegistered(id)) {
Gendustry.logInfo("Fluid %s already registered, using existing (%s)", id, FluidRegistry.getFluid(id))
Gendustry.logDebug("Fluid %s already registered, using existing (%s)", id, FluidRegistry.getFluid(id))
false
} else {
Gendustry.logInfo("Registering fluid %s", id)
Gendustry.logDebug("Registering fluid %s", id)
val newFluid = new Fluid(id)
newFluid.setUnlocalizedName((Misc.getActiveModId + "." + id).toLowerCase)
newFluid.setLuminosity(luminosity)
@@ -34,7 +34,7 @@ class Loader extends RecipeLoader with GenericConfigLoader with LootListLoader {
val resolved = getConcreteStack(ref, cnt)
if (resolved.getItemDamage == OreDictionary.WILDCARD_VALUE) {
resolved.setItemDamage(0)
Gendustry.logInfo("meta/damage is unset in %s, defaulting to 0", ref)
Gendustry.logDebug("meta/damage is unset in %s, defaulting to 0", ref)
}
resolved
}
@@ -51,36 +51,36 @@ class Loader extends RecipeLoader with GenericConfigLoader with LootListLoader {
case RsMutagen(st, mb) =>
for (x <- getAllConcreteStacks(st)) {
MutagenSources.register(x, mb)
Gendustry.logInfo("Added Mutagen source %s -> %d mb", x, mb)
Gendustry.logDebug("Added Mutagen source %s -> %d mb", x, mb)
}
case RsLiquidDNA(st, mb) =>
for (x <- getAllConcreteStacks(st)) {
LiquidDNASources.register(x, mb)
Gendustry.logInfo("Added Liquid DNA source %s -> %d mb", x, mb)
Gendustry.logDebug("Added Liquid DNA source %s -> %d mb", x, mb)
}
case RsProtein(st, mb) =>
for (x <- getAllConcreteStacks(st)) {
ProteinSources.register(x, mb)
Gendustry.logInfo("Added Protein source %s -> %d mb", x, mb)
Gendustry.logDebug("Added Protein source %s -> %d mb", x, mb)
}
case RsAssembly(rec, id, power, out, cnt) =>
Gendustry.logInfo("Adding assembly recipe: %s + %d mj => %s * %d", rec, power, out, cnt)
Gendustry.logDebug("Adding assembly recipe: %s + %d mj => %s * %d", rec, power, out, cnt)
val outStack = getConcreteStack(out, cnt)
val stacks = rec.map {
case (c, n) =>
val s = getConcreteStackNoWildcard(currCharMap(c), n)
Gendustry.logInfo("%s -> %s", c, s)
Gendustry.logDebug("%s -> %s", c, s)
s
}
Gendustry.logInfo("Output: %s", outStack)
Gendustry.logDebug("Output: %s", outStack)
AssemblyRecipeManager.INSTANCE.addRecipe(id, power, outStack, stacks: _*)
Gendustry.logInfo("Done")
Gendustry.logDebug("Done")
case RsCentrifuge(stack, out, time) =>
Gendustry.logInfo("Adding centrifuge recipe: %s => %s", stack, out)
Gendustry.logDebug("Adding centrifuge recipe: %s => %s", stack, out)
// forestry API is stupid and requires a hashmap, build one for it
val outStacks = new java.util.HashMap[ItemStack, Integer]
@@ -90,10 +90,10 @@ class Loader extends RecipeLoader with GenericConfigLoader with LootListLoader {
RecipeManagers.centrifugeManager.addRecipe(time, inStack, outStacks)
Gendustry.logInfo("Done %s -> %s", inStack, outStacks)
Gendustry.logDebug("Done %s -> %s", inStack, outStacks)
case RsSqueezer(in, fluid, time, out, chance) =>
Gendustry.logInfo("Adding squeezer recipe: %s => %s + %s", in, fluid, out)
Gendustry.logDebug("Adding squeezer recipe: %s => %s + %s", in, fluid, out)
val inStack = getConcreteStackNoWildcard(in)
val outStack = if (out != null) getConcreteStackNoWildcard(out) else null
@@ -101,7 +101,7 @@ class Loader extends RecipeLoader with GenericConfigLoader with LootListLoader {
RecipeManagers.squeezerManager.addRecipe(time, Array(inStack), outFluid, outStack, chance)
Gendustry.logInfo("Done %s -> %s + %s", inStack, outStack, outFluid)
Gendustry.logDebug("Done %s -> %s + %s", inStack, outStack, outFluid)
case x: RsMutation => mutations +:= x
@@ -75,15 +75,15 @@ class BeeSpecies(cfg: ConfigSection, ident: String) extends IAlleleBeeSpecies {
TuningLoader.loader.resolveLootList(cfg.getRaw(name, classOf[EntryLootList]))
.toMap.map(x => x._2 -> new Integer(x._1))
Gendustry.logInfo("Resolving products list for bee '%s'...", ident)
Gendustry.logDebug("Resolving products list for bee '%s'...", ident)
val products = prepareLootList("Products")
override val getProducts = products.asJava
products.foreach(x => Gendustry.logInfo(" [%d%%] %s", x._2, x._1))
products.foreach(x => Gendustry.logDebug(" [%d%%] %s", x._2, x._1))
Gendustry.logInfo("Resolving specialty list for bee '%s'...", ident)
Gendustry.logDebug("Resolving specialty list for bee '%s'...", ident)
val specialty = prepareLootList("Specialty")
override val getSpecialty = specialty.asJava
specialty.foreach(x => Gendustry.logInfo(" [%d%%] %s", x._2, x._1))
specialty.foreach(x => Gendustry.logDebug(" [%d%%] %s", x._2, x._1))
override val isNocturnal = cfg.getBoolean("Nocturnal")
override val getRoot = AlleleManager.alleleRegistry.getSpeciesRoot("rootBees").asInstanceOf[IBeeRoot]
@@ -27,10 +27,10 @@ object CustomContent {
var mySpecies = List.empty[BeeSpecies]
def registerBranches() {
Gendustry.logInfo("Registering branches")
Gendustry.logDebug("Registering branches")
val added = (Tuning.getOrAddSection("Branches").filterType(classOf[ConfigSection]) collect {
case (_, cfg) =>
Gendustry.logInfo("%s -> %s (%s)", cfg.getString("Parent"), cfg.getString("UID"), cfg.getString("Scientific"))
Gendustry.logDebug("%s -> %s (%s)", cfg.getString("Parent"), cfg.getString("UID"), cfg.getString("Scientific"))
val cls = reg.createAndRegisterClassification(EnumClassLevel.GENUS, cfg.getString("UID"), cfg.getString("Scientific"))
reg.getClassification("family." + cfg.getString("Parent")).addMemberGroup(cls)
}).size
@@ -38,11 +38,11 @@ object CustomContent {
}
def registerSpecies() {
Gendustry.logInfo("Registering bees")
Gendustry.logDebug("Registering bees")
val added = (Tuning.getOrAddSection("Bees").filterType(classOf[ConfigSection]) collect {
case (uid, cfg) =>
val species = new BeeSpecies(cfg, uid)
Gendustry.logInfo("Registering %s", species.getUID)
Gendustry.logDebug("Registering %s", species.getUID)
mySpecies +:= species
reg.registerAllele(species)
}).size
@@ -55,12 +55,12 @@ object CustomContent {
.asInstanceOf[IAlleleBeeSpecies]
def registerMutations() {
Gendustry.logInfo("Registering mutations")
Gendustry.logDebug("Registering mutations")
val added = TuningLoader.loader.mutations count { st =>
try {
Gendustry.logInfo("Registering mutation %s + %s = %s", st.parent1, st.parent2, st.result)
Gendustry.logDebug("Registering mutation %s + %s = %s", st.parent1, st.parent2, st.result)
val mutation = new BeeMutation(
lookupBeeSpecies(st.parent1),
@@ -62,8 +62,8 @@ object GeneticsCache {
speciesUsedMutations(mutation.getAllele1.asInstanceOf[IAlleleSpecies]) += mutation
}
Gendustry.logInfo("Mutations with multiple results from a single combination:")
Gendustry.logInfo("(This is not an error, no need to report it to anybody)")
Gendustry.logDebug("Mutations with multiple results from a single combination:")
Gendustry.logDebug("(This is not an error, no need to report it to anybody)")
speciesUsedMutations foreach { case (sp1, mutations) =>
// First make a list of partner -> result
@@ -83,12 +83,12 @@ object GeneticsCache {
(if (Option(mutation.getSpecialConditions).map(_.size).getOrElse(0) > 0) "*" else "")
} mkString ", "
// And print it out
Gendustry.logInfo("%s + %s => [%s]", sp1.getName, partner.getName, names)
Gendustry.logDebug("%s + %s => [%s]", sp1.getName, partner.getName, names)
}
}
Gendustry.logInfo("%d mutation outputs", speciesResultMutations.size)
Gendustry.logInfo("%d mutation inputs", speciesUsedMutations.size)
Gendustry.logInfo("Cached %d mutation outputs", speciesResultMutations.size)
Gendustry.logInfo("Cached %d mutation inputs", speciesUsedMutations.size)
for (species <- Misc.filterType(AlleleManager.alleleRegistry.getRegisteredAlleles.values(), classOf[IAlleleSpecies])) {
if (species.getRoot.getTemplate(species.getUID) == null) {
@@ -103,7 +103,6 @@ object GeneticsCache {
geneSamples ++= speciesChromosomes.keys
Gendustry.logInfo("%d chromosomes", speciesChromosomes.size)
Gendustry.logInfo("Done")
Gendustry.logInfo("Cached %d chromosomes", speciesChromosomes.size)
}
}