2021-08-12 19:55:20 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
|
|
|
|
Date: Thu, 12 Aug 2021 04:46:41 -0700
|
|
|
|
Subject: [PATCH] Use AsyncAppender to keep logging IO off main thread
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
2022-12-07 19:52:24 +01:00
|
|
|
index 8f8e6dea5f5f2a537a753efcc38484e3cd6a888f..28ca89a36d9cf9b7aca51a21be89e220c8e07589 100644
|
2021-08-12 19:55:20 +02:00
|
|
|
--- a/build.gradle.kts
|
|
|
|
+++ b/build.gradle.kts
|
2022-06-09 10:51:45 +02:00
|
|
|
@@ -26,6 +26,7 @@ dependencies {
|
2022-06-07 23:45:11 +02:00
|
|
|
implementation("commons-lang:commons-lang:2.6")
|
2021-11-23 16:04:41 +01:00
|
|
|
runtimeOnly("org.xerial:sqlite-jdbc:3.36.0.3")
|
2022-06-07 23:45:11 +02:00
|
|
|
runtimeOnly("mysql:mysql-connector-java:8.0.29")
|
2021-08-12 19:55:20 +02:00
|
|
|
+ runtimeOnly("com.lmax:disruptor:3.4.4") // Paper
|
|
|
|
|
2022-06-08 09:49:02 +02:00
|
|
|
runtimeOnly("org.apache.maven:maven-resolver-provider:3.8.5")
|
|
|
|
runtimeOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.7.3")
|
2021-08-12 19:55:20 +02:00
|
|
|
diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml
|
|
|
|
index 476f4a5cbe664ddd05474cb88553018bd334a5b8..3dc317e466e1b93dff030794dd7f29ca1b266778 100644
|
|
|
|
--- a/src/main/resources/log4j2.xml
|
|
|
|
+++ b/src/main/resources/log4j2.xml
|
|
|
|
@@ -29,15 +29,18 @@
|
|
|
|
</Policies>
|
|
|
|
<DefaultRolloverStrategy max="1000"/>
|
|
|
|
</RollingRandomAccessFile>
|
|
|
|
+ <Async name="Async">
|
|
|
|
+ <AppenderRef ref="File"/>
|
|
|
|
+ <AppenderRef ref="TerminalConsole" level="info"/>
|
|
|
|
+ <AppenderRef ref="ServerGuiConsole" level="info"/>
|
|
|
|
+ </Async>
|
|
|
|
</Appenders>
|
|
|
|
<Loggers>
|
|
|
|
<Root level="info">
|
|
|
|
<filters>
|
|
|
|
<MarkerFilter marker="NETWORK_PACKETS" onMatch="DENY" onMismatch="NEUTRAL" />
|
|
|
|
</filters>
|
|
|
|
- <AppenderRef ref="File"/>
|
|
|
|
- <AppenderRef ref="TerminalConsole" level="info"/>
|
|
|
|
- <AppenderRef ref="ServerGuiConsole" level="info"/>
|
|
|
|
+ <AppenderRef ref="Async"/>
|
|
|
|
</Root>
|
|
|
|
</Loggers>
|
|
|
|
</Configuration>
|