Remove "grapqhl log level" setting (#1155)

internal logging was removed with graphql-java v22.0
This commit is contained in:
schroda
2024-11-18 03:11:26 +01:00
committed by GitHub
parent 746f9f1a11
commit 6951b4b20d
7 changed files with 5 additions and 15 deletions
@@ -156,7 +156,6 @@ class SettingsMutation {
// misc
updateSetting(settings.debugLogsEnabled, serverConfig.debugLogsEnabled)
updateSetting(settings.gqlDebugLogsEnabled, serverConfig.gqlDebugLogsEnabled)
updateSetting(settings.systemTrayEnabled, serverConfig.systemTrayEnabled)
updateSetting(settings.maxLogFiles, serverConfig.maxLogFiles)
updateSetting(settings.maxLogFileSize, serverConfig.maxLogFileSize)
@@ -35,7 +35,6 @@ import suwayomi.tachidesk.graphql.server.subscriptions.SubscriptionOperationMess
import suwayomi.tachidesk.graphql.server.subscriptions.SubscriptionOperationMessage.ServerMessages.GQL_ERROR
import suwayomi.tachidesk.graphql.server.subscriptions.SubscriptionOperationMessage.ServerMessages.GQL_NEXT
import suwayomi.tachidesk.graphql.server.toGraphQLContext
import suwayomi.tachidesk.server.serverConfig
/**
* Implementation of the `graphql-transport-ws` protocol defined by Denis Badurina
@@ -71,12 +70,6 @@ class ApolloSubscriptionProtocolHandler(
logger.debug {
"GraphQL subscription client message, sessionId=${context.sessionId()} type=${operationMessage.type} operationName=${
getOperationName(operationMessage.payload)
} ${
if (serverConfig.gqlDebugLogsEnabled.value) {
"operationMessage=$operationMessage"
} else {
""
}
}"
}
}
@@ -71,6 +71,8 @@ interface Settings : Node {
// misc
val debugLogsEnabled: Boolean?
@GraphQLDeprecated("Removed - does not do anything")
val gqlDebugLogsEnabled: Boolean?
val systemTrayEnabled: Boolean?
val maxLogFiles: Int?
@@ -140,6 +142,7 @@ data class PartialSettingsType(
override val basicAuthPassword: String?,
// misc
override val debugLogsEnabled: Boolean?,
@GraphQLDeprecated("Removed - does not do anything")
override val gqlDebugLogsEnabled: Boolean?,
override val systemTrayEnabled: Boolean?,
override val maxLogFiles: Int?,
@@ -206,6 +209,7 @@ class SettingsType(
override val basicAuthPassword: String,
// misc
override val debugLogsEnabled: Boolean,
@GraphQLDeprecated("Removed - does not do anything")
override val gqlDebugLogsEnabled: Boolean,
override val systemTrayEnabled: Boolean,
override val maxLogFiles: Int,
@@ -267,7 +271,7 @@ class SettingsType(
config.basicAuthPassword.value,
// misc
config.debugLogsEnabled.value,
config.gqlDebugLogsEnabled.value,
false,
config.systemTrayEnabled.value,
config.maxLogFiles.value,
config.maxLogFileSize.value,
@@ -133,7 +133,6 @@ class ServerConfig(
// misc
val debugLogsEnabled: MutableStateFlow<Boolean> by OverrideConfigValue(BooleanConfigAdapter)
val gqlDebugLogsEnabled: MutableStateFlow<Boolean> by OverrideConfigValue(BooleanConfigAdapter)
val systemTrayEnabled: MutableStateFlow<Boolean> by OverrideConfigValue(BooleanConfigAdapter)
val maxLogFiles: MutableStateFlow<Int> by OverrideConfigValue(IntConfigAdapter)
val maxLogFileSize: MutableStateFlow<String> by OverrideConfigValue(StringConfigAdapter)
@@ -127,9 +127,6 @@ fun applicationSetup() {
)
setupLogLevelUpdating(serverConfig.debugLogsEnabled, listOf(BASE_LOGGER_NAME))
// gql "ExecutionStrategy" spams logs with "... completing field ..."
// gql "notprivacysafe" logs every received request multiple times (received, parsing, validating, executing)
setupLogLevelUpdating(serverConfig.gqlDebugLogsEnabled, listOf("graphql", "notprivacysafe"), Level.WARN)
logger.info("Running Suwayomi-Server ${BuildConfig.VERSION} revision ${BuildConfig.REVISION}")
@@ -49,7 +49,6 @@ server.basicAuthPassword = ""
# misc
server.debugLogsEnabled = false
server.gqlDebugLogsEnabled = false # this includes logs with non privacy safe information
server.systemTrayEnabled = true
server.maxLogFiles = 31 # the max number of days to keep files before they get deleted
server.maxLogFileSize = "10mb" # the max size of a log file - possible values: 1 (bytes), 1KB (kilobytes), 1MB (megabytes), 1GB (gigabytes)
@@ -49,7 +49,6 @@ server.basicAuthPassword = ""
# misc
server.debugLogsEnabled = false
server.gqlDebugLogsEnabled = false # this includes logs with non privacy safe information
server.systemTrayEnabled = true
# backup