preemptively create detail log file
This commit is contained in:
@@ -48,6 +48,9 @@ object BetterFoliageMod {
|
|||||||
@Mod.EventHandler
|
@Mod.EventHandler
|
||||||
fun preInit(event: FMLPreInitializationEvent) {
|
fun preInit(event: FMLPreInitializationEvent) {
|
||||||
log = event.modLog
|
log = event.modLog
|
||||||
|
val logDetailFile = File(event.modConfigurationDirectory.parentFile, "logs/betterfoliage.log").apply {
|
||||||
|
if (!exists()) createNewFile()
|
||||||
|
}
|
||||||
logDetail = SimpleLogger(
|
logDetail = SimpleLogger(
|
||||||
"BetterFoliage",
|
"BetterFoliage",
|
||||||
DEBUG,
|
DEBUG,
|
||||||
@@ -55,7 +58,7 @@ object BetterFoliageMod {
|
|||||||
"yyyy-MM-dd HH:mm:ss",
|
"yyyy-MM-dd HH:mm:ss",
|
||||||
null,
|
null,
|
||||||
PropertiesUtil(Properties()),
|
PropertiesUtil(Properties()),
|
||||||
PrintStream(File(event.modConfigurationDirectory.parentFile, "logs/betterfoliage.log"))
|
PrintStream(logDetailFile)
|
||||||
)
|
)
|
||||||
config = Configuration(event.suggestedConfigurationFile, null, true)
|
config = Configuration(event.suggestedConfigurationFile, null, true)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user