Skip to content

Commit

Permalink
logback update compat
Browse files Browse the repository at this point in the history
  • Loading branch information
rfresh2 committed Aug 8, 2023
1 parent beb9d6e commit 934194d
Show file tree
Hide file tree
Showing 6 changed files with 99 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ public void doAppend(T eventObject) {
}

private void maybeStart() {
lock.lock();
streamWriteLock.lock();
try {
if (!this.started.get()) {
this.start();
}
} finally {
lock.unlock();
streamWriteLock.unlock();
}
}
}
86 changes: 45 additions & 41 deletions src/main/resources/META-INF/native-image/reflect-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@
"queryAllPublicMethods":true,
"methods":[{"name":"<init>","parameterTypes":[] }, {"name":"setLevel","parameterTypes":["java.lang.String"] }]
},
{
"name":"ch.qos.logback.classic.joran.SerializedModelConfigurator",
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"name":"ch.qos.logback.classic.jul.LevelChangePropagator",
"queryAllPublicMethods":true,
Expand Down Expand Up @@ -622,7 +626,7 @@
"name":"com.zenith.Proxy",
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
"methods":[{"name":"handleClientDisconnect","parameterTypes":["com.zenith.event.proxy.ProxyClientDisconnectedEvent"] }, {"name":"handleConnectEvent","parameterTypes":["com.zenith.event.proxy.ConnectEvent"] }, {"name":"handleDisconnectEvent","parameterTypes":["com.zenith.event.proxy.DisconnectEvent"] }, {"name":"handlePlayerOnlineEvent","parameterTypes":["com.zenith.event.proxy.PlayerOnlineEvent"] }, {"name":"handlePrioStatusEvent","parameterTypes":["com.zenith.event.proxy.PrioStatusEvent"] }, {"name":"handleQueueCompleteEvent","parameterTypes":["com.zenith.event.proxy.QueueCompleteEvent"] }, {"name":"handleQueuePositionUpdateEvent","parameterTypes":["com.zenith.event.proxy.QueuePositionUpdateEvent"] }, {"name":"handleServerPlayerConnectedEvent","parameterTypes":["com.zenith.event.proxy.ServerPlayerConnectedEvent"] }, {"name":"handleServerPlayerDisconnectedEvent","parameterTypes":["com.zenith.event.proxy.ServerPlayerDisconnectedEvent"] }, {"name":"handleStartQueueEvent","parameterTypes":["com.zenith.event.proxy.StartQueueEvent"] }, {"name":"handleServerRestartingEvent","parameterTypes":["com.zenith.event.proxy.ServerRestartingEvent"] }]
"methods":[{"name":"handleClientDisconnect","parameterTypes":["com.zenith.event.proxy.ProxyClientDisconnectedEvent"] }, {"name":"handleConnectEvent","parameterTypes":["com.zenith.event.proxy.ConnectEvent"] }, {"name":"handleDisconnectEvent","parameterTypes":["com.zenith.event.proxy.DisconnectEvent"] }, {"name":"handlePlayerOnlineEvent","parameterTypes":["com.zenith.event.proxy.PlayerOnlineEvent"] }, {"name":"handlePrioStatusEvent","parameterTypes":["com.zenith.event.proxy.PrioStatusEvent"] }, {"name":"handleQueueCompleteEvent","parameterTypes":["com.zenith.event.proxy.QueueCompleteEvent"] }, {"name":"handleQueuePositionUpdateEvent","parameterTypes":["com.zenith.event.proxy.QueuePositionUpdateEvent"] }, {"name":"handleServerPlayerConnectedEvent","parameterTypes":["com.zenith.event.proxy.ServerPlayerConnectedEvent"] }, {"name":"handleServerPlayerDisconnectedEvent","parameterTypes":["com.zenith.event.proxy.ServerPlayerDisconnectedEvent"] }, {"name":"handleServerRestartingEvent","parameterTypes":["com.zenith.event.proxy.ServerRestartingEvent"] }, {"name":"handleStartQueueEvent","parameterTypes":["com.zenith.event.proxy.StartQueueEvent"] }]
},
{
"name":"com.zenith.command.impl.ActiveHoursCommand",
Expand Down Expand Up @@ -812,7 +816,7 @@
"name":"com.zenith.database.QueueWaitDatabase",
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
"methods":[{"name":"handleQueueComplete","parameterTypes":["com.zenith.event.proxy.QueueCompleteEvent"] }, {"name":"handleQueuePosition","parameterTypes":["com.zenith.event.proxy.QueuePositionUpdateEvent"] }, {"name":"handleStartQueue","parameterTypes":["com.zenith.event.proxy.StartQueueEvent"] }, {"name":"handleServerRestart","parameterTypes":["com.zenith.event.proxy.ServerRestartingEvent"] }]
"methods":[{"name":"handleQueueComplete","parameterTypes":["com.zenith.event.proxy.QueueCompleteEvent"] }, {"name":"handleQueuePosition","parameterTypes":["com.zenith.event.proxy.QueuePositionUpdateEvent"] }, {"name":"handleServerRestart","parameterTypes":["com.zenith.event.proxy.ServerRestartingEvent"] }, {"name":"handleStartQueue","parameterTypes":["com.zenith.event.proxy.StartQueueEvent"] }]
},
{
"name":"com.zenith.database.RestartsDatabase",
Expand All @@ -824,77 +828,85 @@
"name":"com.zenith.database.dto.tables.records.ChatsRecord",
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
"methods":[{"name":"<init>","parameterTypes":[] }],
"unsafeAllocated":true
"unsafeAllocated":true,
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"name":"com.zenith.database.dto.tables.records.ConnectionsRecord",
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
"methods":[{"name":"<init>","parameterTypes":[] }],
"unsafeAllocated":true
"unsafeAllocated":true,
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"name":"com.zenith.database.dto.tables.records.DeathsRecord",
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
"methods":[{"name":"<init>","parameterTypes":[] }],
"unsafeAllocated":true
"unsafeAllocated":true,
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"name":"com.zenith.database.dto.tables.records.NamesRecord",
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
"methods":[{"name":"<init>","parameterTypes":[] }],
"unsafeAllocated":true
"unsafeAllocated":true,
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"name":"com.zenith.database.dto.tables.records.PlayercountRecord",
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
"methods":[{"name":"<init>","parameterTypes":[] }],
"unsafeAllocated":true
"unsafeAllocated":true,
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"name":"com.zenith.database.dto.tables.records.PlaytimeAllRecord",
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
"methods":[{"name":"<init>","parameterTypes":[] }],
"unsafeAllocated":true
"unsafeAllocated":true,
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"name":"com.zenith.database.dto.tables.records.QueuelengthRecord",
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
"methods":[{"name":"<init>","parameterTypes":[] }],
"unsafeAllocated":true
"unsafeAllocated":true,
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"name":"com.zenith.database.dto.tables.records.QueuewaitRecord",
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
"methods":[{"name":"<init>","parameterTypes":[] }],
"unsafeAllocated":true
"unsafeAllocated":true,
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"name":"com.zenith.database.dto.tables.records.RestartsRecord",
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
"methods":[{"name":"<init>","parameterTypes":[] }],
"unsafeAllocated":true
"unsafeAllocated":true,
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"name":"com.zenith.discord.DiscordBot",
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
"methods":[{"name":"handleAutoEatOutOfFood","parameterTypes":["com.zenith.event.module.AutoEatOutOfFoodEvent"] }, {"name":"handleConnectEvent","parameterTypes":["com.zenith.event.proxy.ConnectEvent"] }, {"name":"handleDeathEvent","parameterTypes":["com.zenith.event.proxy.DeathEvent"] }, {"name":"handleDeathMessageEvent","parameterTypes":["com.zenith.event.proxy.DeathMessageEvent"] }, {"name":"handleDeathMessageEvent","parameterTypes":["com.zenith.event.proxy.SelfDeathMessageEvent"] }, {"name":"handleDisconnectEvent","parameterTypes":["com.zenith.event.proxy.DisconnectEvent"] }, {"name":"handleNewPlayerInVisualRangeEvent","parameterTypes":["com.zenith.event.proxy.NewPlayerInVisualRangeEvent"] }, {"name":"handlePlayerOnlineEvent","parameterTypes":["com.zenith.event.proxy.PlayerOnlineEvent"] }, {"name":"handleProxyClientConnectedEvent","parameterTypes":["com.zenith.event.proxy.ProxyClientConnectedEvent"] }, {"name":"handleProxyClientDisconnectedEvent","parameterTypes":["com.zenith.event.proxy.ProxyClientDisconnectedEvent"] }, {"name":"handleQueueCompleteEvent","parameterTypes":["com.zenith.event.proxy.QueueCompleteEvent"] }, {"name":"handleQueuePositionUpdateEvent","parameterTypes":["com.zenith.event.proxy.QueuePositionUpdateEvent"] }, {"name":"handleServerChatReceivedEvent","parameterTypes":["com.zenith.event.proxy.ServerChatReceivedEvent"] }, {"name":"handleServerPlayerConnectedEvent","parameterTypes":["com.zenith.event.proxy.ServerPlayerConnectedEvent"] }, {"name":"handleServerPlayerDisconnectedEvent","parameterTypes":["com.zenith.event.proxy.ServerPlayerDisconnectedEvent"] }, {"name":"handleStartConnectEvent","parameterTypes":["com.zenith.event.proxy.StartConnectEvent"] }, {"name":"handleStartQueueEvent","parameterTypes":["com.zenith.event.proxy.StartQueueEvent"] }, {"name": "handleServerRestartingEvent", "parameterTypes":["com.zenith.event.proxy.ServerRestartingEvent"]}, {"name": "handleAutoDisconnectEvent", "parameterTypes":["com.zenith.event.proxy.HealthAutoDisconnectEvent"]}, {"name":"handleProxySpectatorConnectedEvent","parameterTypes":["com.zenith.event.proxy.ProxySpectatorConnectedEvent"]}, {"name":"handleNonWhitelistedPlayerConnectedEvent","parameterTypes":["com.zenith.event.proxy.NonWhitelistedPlayerConnectedEvent"]}, {"name":"handleProxySpectatorDisconnectedEvent","parameterTypes":["com.zenith.event.proxy.ProxySpectatorDisconnectedEvent"]}, {"name":"handleActiveHoursConnectEvent","parameterTypes":["com.zenith.event.proxy.ActiveHoursConnectEvent"]}, {"name":"handleDiscordMessageSentEvent","parameterTypes":["com.zenith.event.proxy.DiscordMessageSentEvent"]}, {"name":"handleUpdateStartEvent","parameterTypes":["com.zenith.event.proxy.UpdateStartEvent"]}, {"name":"handleProxyLoginFailedEvent","parameterTypes":["com.zenith.event.proxy.ProxyLoginFailedEvent"]}, {"name":"handleProxyLoginFailedEvent","parameterTypes":["com.zenith.event.proxy.ProxyLoginFailedEvent"]}, {"name":"handlePrioStatusUpdateEvent","parameterTypes":["com.zenith.event.proxy.PrioStatusUpdateEvent"]}, {"name":"handlePrioBanStatusUpdateEvent","parameterTypes":["com.zenith.event.proxy.PrioBanStatusUpdateEvent"]}, {"name":"handleAntiAfkStuckEvent","parameterTypes":["com.zenith.event.module.AntiAfkStuckEvent"]}, {"name":"handleAutoReconnectEvent","parameterTypes":["com.zenith.event.proxy.AutoReconnectEvent"]}, {"name":"handleMsaDeviceCodeLoginEvent","parameterTypes":["com.zenith.event.proxy.MsaDeviceCodeLoginEvent"]}]
"methods":[{"name":"handleActiveHoursConnectEvent","parameterTypes":["com.zenith.event.proxy.ActiveHoursConnectEvent"] }, {"name":"handleAntiAfkStuckEvent","parameterTypes":["com.zenith.event.module.AntiAfkStuckEvent"] }, {"name":"handleAutoDisconnectEvent","parameterTypes":["com.zenith.event.proxy.HealthAutoDisconnectEvent"] }, {"name":"handleAutoEatOutOfFood","parameterTypes":["com.zenith.event.module.AutoEatOutOfFoodEvent"] }, {"name":"handleAutoReconnectEvent","parameterTypes":["com.zenith.event.proxy.AutoReconnectEvent"] }, {"name":"handleConnectEvent","parameterTypes":["com.zenith.event.proxy.ConnectEvent"] }, {"name":"handleDeathEvent","parameterTypes":["com.zenith.event.proxy.DeathEvent"] }, {"name":"handleDeathMessageEvent","parameterTypes":["com.zenith.event.proxy.DeathMessageEvent"] }, {"name":"handleDeathMessageEvent","parameterTypes":["com.zenith.event.proxy.SelfDeathMessageEvent"] }, {"name":"handleDisconnectEvent","parameterTypes":["com.zenith.event.proxy.DisconnectEvent"] }, {"name":"handleDiscordMessageSentEvent","parameterTypes":["com.zenith.event.proxy.DiscordMessageSentEvent"] }, {"name":"handleMsaDeviceCodeLoginEvent","parameterTypes":["com.zenith.event.proxy.MsaDeviceCodeLoginEvent"] }, {"name":"handleNewPlayerInVisualRangeEvent","parameterTypes":["com.zenith.event.proxy.NewPlayerInVisualRangeEvent"] }, {"name":"handleNonWhitelistedPlayerConnectedEvent","parameterTypes":["com.zenith.event.proxy.NonWhitelistedPlayerConnectedEvent"] }, {"name":"handlePlayerOnlineEvent","parameterTypes":["com.zenith.event.proxy.PlayerOnlineEvent"] }, {"name":"handlePrioBanStatusUpdateEvent","parameterTypes":["com.zenith.event.proxy.PrioBanStatusUpdateEvent"] }, {"name":"handlePrioStatusUpdateEvent","parameterTypes":["com.zenith.event.proxy.PrioStatusUpdateEvent"] }, {"name":"handleProxyClientConnectedEvent","parameterTypes":["com.zenith.event.proxy.ProxyClientConnectedEvent"] }, {"name":"handleProxyClientDisconnectedEvent","parameterTypes":["com.zenith.event.proxy.ProxyClientDisconnectedEvent"] }, {"name":"handleProxyLoginFailedEvent","parameterTypes":["com.zenith.event.proxy.ProxyLoginFailedEvent"] }, {"name":"handleProxySpectatorConnectedEvent","parameterTypes":["com.zenith.event.proxy.ProxySpectatorConnectedEvent"] }, {"name":"handleProxySpectatorDisconnectedEvent","parameterTypes":["com.zenith.event.proxy.ProxySpectatorDisconnectedEvent"] }, {"name":"handleQueueCompleteEvent","parameterTypes":["com.zenith.event.proxy.QueueCompleteEvent"] }, {"name":"handleQueuePositionUpdateEvent","parameterTypes":["com.zenith.event.proxy.QueuePositionUpdateEvent"] }, {"name":"handleServerChatReceivedEvent","parameterTypes":["com.zenith.event.proxy.ServerChatReceivedEvent"] }, {"name":"handleServerPlayerConnectedEvent","parameterTypes":["com.zenith.event.proxy.ServerPlayerConnectedEvent"] }, {"name":"handleServerPlayerDisconnectedEvent","parameterTypes":["com.zenith.event.proxy.ServerPlayerDisconnectedEvent"] }, {"name":"handleServerRestartingEvent","parameterTypes":["com.zenith.event.proxy.ServerRestartingEvent"] }, {"name":"handleStartConnectEvent","parameterTypes":["com.zenith.event.proxy.StartConnectEvent"] }, {"name":"handleStartQueueEvent","parameterTypes":["com.zenith.event.proxy.StartQueueEvent"] }, {"name":"handleUpdateStartEvent","parameterTypes":["com.zenith.event.proxy.UpdateStartEvent"] }]
},
{
"name":"com.zenith.feature.autoupdater.AutoUpdater",
"queryAllDeclaredMethods":true,
"queryAllPublicMethods":true,
"methods":[{"name":"handleDisconnectEvent","parameterTypes":["com.zenith.event.proxy.DisconnectEvent"] }]
},
{
"name":"com.zenith.feature.autoupdater.GitAutoUpdater",
"queryAllDeclaredMethods":true
},
{
"name":"com.zenith.feature.autoupdater.RestAutoUpdater",
"queryAllDeclaredMethods":true
},
{
"name":"com.zenith.feature.food.FoodData",
"allDeclaredFields":true,
Expand Down Expand Up @@ -951,12 +963,12 @@
"methods":[{"name":"<init>","parameterTypes":[] }, {"name":"setDescription","parameterTypes":["java.lang.String"] }, {"name":"setDisplayName","parameterTypes":["java.lang.String"] }, {"name":"setMetadata","parameterTypes":["java.lang.Integer"] }]
},
{
"name":"com.zenith.feature.queue.mcping.data.ExtraResponse",
"name":"com.zenith.feature.queue.QueueStatus",
"allDeclaredFields":true,
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"name":"com.zenith.feature.queue.QueueStatus",
"name":"com.zenith.feature.queue.mcping.data.ExtraResponse",
"allDeclaredFields":true,
"methods":[{"name":"<init>","parameterTypes":[] }]
},
Expand Down Expand Up @@ -1348,6 +1360,11 @@
"allDeclaredFields":true,
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"name":"com.zenith.util.LaunchConfig",
"allDeclaredFields":true,
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"name":"discord4j.discordjson.Id",
"allDeclaredFields":true,
Expand All @@ -1359,11 +1376,6 @@
"name":"discord4j.discordjson.json.Activity",
"queryAllDeclaredMethods":true
},
{
"name":"discord4j.rest.json.response.ErrorResponse",
"queryAllDeclaredMethods":true,
"methods":[{"name":"<init>","parameterTypes":[]}, {"name":"anySetter","parameterTypes":["java.lang.String","java.lang.Object"]}]
},
{
"name":"discord4j.discordjson.json.ActivityAssetsData",
"queryAllDeclaredMethods":true
Expand Down Expand Up @@ -2482,6 +2494,11 @@
"name":"discord4j.gateway.json.jackson.PayloadDeserializer",
"methods":[{"name":"<init>","parameterTypes":[] }]
},
{
"name":"discord4j.rest.json.response.ErrorResponse",
"queryAllDeclaredMethods":true,
"methods":[{"name":"<init>","parameterTypes":[] }, {"name":"anySetter","parameterTypes":["java.lang.String","java.lang.Object"] }]
},
{
"name":"fr.litarvan.openauth.microsoft.model.request.MinecraftLoginRequest",
"allDeclaredFields":true,
Expand Down Expand Up @@ -4409,18 +4426,5 @@
{
"name":"sun.security.x509.SubjectKeyIdentifierExtension",
"methods":[{"name":"<init>","parameterTypes":["java.lang.Boolean","java.lang.Object"] }]
},
{
"name":"com.zenith.feature.autoupdater.RestAutoUpdater",
"queryAllDeclaredMethods":true
},
{
"name":"com.zenith.feature.autoupdater.GitAutoUpdater",
"queryAllDeclaredMethods":true
},
{
"name":"com.zenith.util.LaunchConfig",
"allDeclaredFields":true,
"methods":[{"name":"<init>","parameterTypes":[] }]
}
]
8 changes: 6 additions & 2 deletions src/main/resources/META-INF/native-image/resource-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
"pattern":"\\Qlinux_x86_64/velocity-cipher-ossl30x.so\\E"
}, {
"pattern":"\\Qlinux_x86_64/velocity-compress.so\\E"
}, {
"pattern":"\\Qlogback.scmo\\E"
}, {
"pattern":"\\Qlogback.xml\\E"
}, {
Expand All @@ -44,6 +46,8 @@
"pattern":"\\Qorg/jline/utils/*.caps\\E"
}, {
"pattern":"\\Qorg/jline/utils/capabilities.txt\\E"
}, {
"pattern":"\\Qorg/jline/utils/dumb-color.caps\\E"
}, {
"pattern":"\\Qorg/jline/utils/screen.caps\\E"
}, {
Expand All @@ -52,10 +56,10 @@
"pattern":"\\Qpc/1.12/blocks.json\\E"
}, {
"pattern":"\\Qpc/1.12/foods.json\\E"
}, {
"pattern":"\\Qproxy_version.txt\\E"
}, {
"pattern":"\\Qproxy_commit.txt\\E"
}, {
"pattern":"\\Qproxy_version.txt\\E"
}, {
"pattern":"\\Qyggdrasil_session_pubkey.der\\E"
}, {
Expand Down
45 changes: 45 additions & 0 deletions src/main/resources/META-INF/native-image/serialization-config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,50 @@
{
"types":[
{
"name":"ch.qos.logback.classic.model.ConfigurationModel"
},
{
"name":"ch.qos.logback.classic.model.LoggerContextListenerModel"
},
{
"name":"ch.qos.logback.classic.model.LoggerModel"
},
{
"name":"ch.qos.logback.classic.model.RootLoggerModel"
},
{
"name":"ch.qos.logback.core.model.AppenderModel"
},
{
"name":"ch.qos.logback.core.model.AppenderRefModel"
},
{
"name":"ch.qos.logback.core.model.ComponentModel"
},
{
"name":"ch.qos.logback.core.model.ImplicitModel"
},
{
"name":"ch.qos.logback.core.model.ImportModel"
},
{
"name":"ch.qos.logback.core.model.Model"
},
{
"name":"ch.qos.logback.core.model.NamedComponentModel"
},
{
"name":"ch.qos.logback.core.model.SerializeModelModel"
},
{
"name":"ch.qos.logback.core.model.ShutdownHookModel"
},
{
"name":"ch.qos.logback.core.model.StatusListenerModel"
},
{
"name":"java.util.ArrayList"
}
],
"lambdaCapturingTypes":[
],
Expand Down
Binary file added src/main/resources/logback.scmo
Binary file not shown.
1 change: 1 addition & 0 deletions src/main/resources/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator">
<resetJUL>true</resetJUL>
</contextListener>
<serializeModel file="src/main/resources/logback.scmo"/>
<import class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"/>
<import class="ch.qos.logback.classic.filter.ThresholdFilter"/>
<import class="ch.qos.logback.classic.filter.LevelFilter"/>
Expand Down

0 comments on commit 934194d

Please sign in to comment.