Skip to content

Commit

Permalink
chore: automatically enable file logs when updater is in home directory
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkAtra committed Dec 30, 2024
1 parent 3c14ae5 commit 58067a8
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
allprojects {
group = "de.darkatra.bfme2"
version = "0.18.2"
version = "0.18.3"

repositories {
mavenCentral()
9 changes: 7 additions & 2 deletions updater/src/main/kotlin/de/darkatra/bfme2/Main.kt
Original file line number Diff line number Diff line change
@@ -35,9 +35,14 @@ val LOGGER: Logger = Logger.getLogger("updater")

fun main(args: Array<String>) {

if ("filelog" in args) {
if ("filelog" in args || SelfUpdateService.isInCorrectLocation()) {
LOGGER.addHandler(
FileHandler(UpdaterContext.applicationHome.parent.toAbsolutePath().resolve("log-%g.txt").absolutePathString()).apply {
FileHandler(
UpdaterContext.applicationHome.parent.toAbsolutePath().resolve("log-%g.txt").absolutePathString(),
50000,
1,
true
).apply {
formatter = SimpleFormatter()
}
)

0 comments on commit 58067a8

Please sign in to comment.