Use AsyncAppender to keep logging IO off main thread

This commit is contained in:
Jason Penilla 2021-08-12 04:46:41 -07:00
parent e36a7522b8
commit b0d7c2e971
2 changed files with 7 additions and 3 deletions

View File

@ -48,6 +48,7 @@ dependencies {
implementation("commons-lang:commons-lang:2.6")
runtimeOnly("org.xerial:sqlite-jdbc:3.47.0.0")
runtimeOnly("com.mysql:mysql-connector-j:9.1.0")
runtimeOnly("com.lmax:disruptor:3.4.4") // Paper
runtimeOnly("org.apache.maven:maven-resolver-provider:3.9.6")
runtimeOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.9.18")

View File

@ -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>