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
|
2023-12-07 21:27:28 +01:00
|
|
|
index 2c885574b6c2667984b4996af0a421d8325842ef..4b4aa6cc48abb6a2d31c2043e0eff25bca0d05b3 100644
|
2021-08-12 19:55:20 +02:00
|
|
|
--- a/build.gradle.kts
|
|
|
|
+++ b/build.gradle.kts
|
2023-10-22 21:12:00 +02:00
|
|
|
@@ -37,6 +37,7 @@ dependencies {
|
2022-06-07 23:45:11 +02:00
|
|
|
implementation("commons-lang:commons-lang:2.6")
|
2023-10-03 13:55:12 +02:00
|
|
|
runtimeOnly("org.xerial:sqlite-jdbc:3.42.0.1")
|
2023-09-22 00:01:00 +02:00
|
|
|
runtimeOnly("com.mysql:mysql-connector-j:8.1.0")
|
2021-08-12 19:55:20 +02:00
|
|
|
+ runtimeOnly("com.lmax:disruptor:3.4.4") // Paper
|
|
|
|
|
2023-06-18 13:03:18 +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
|
2023-06-13 00:00:12 +02:00
|
|
|
index 88957220d5574e5590e8a545605d76c0c7b0a10e..ea4e2161c0bd43884055cc6b8d70b2139f70e720 100644
|
2021-08-12 19:55:20 +02:00
|
|
|
--- 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>
|