diff --git a/core/src/main/kotlin/me/rhunk/snapenhance/core/bridge/BridgeClient.kt b/core/src/main/kotlin/me/rhunk/snapenhance/core/bridge/BridgeClient.kt index 4c78b017..444e9e86 100644 --- a/core/src/main/kotlin/me/rhunk/snapenhance/core/bridge/BridgeClient.kt +++ b/core/src/main/kotlin/me/rhunk/snapenhance/core/bridge/BridgeClient.kt @@ -118,7 +118,11 @@ class BridgeClient( } fun broadcastLog(tag: String, level: String, message: String) { - safeServiceCall { service.broadcastLog(tag, level, message) } + message.chunked(1024 * 256).forEach { + safeServiceCall { + service.broadcastLog(tag, level, it) + } + } } //TODO: use interfaces instead of direct file access diff --git a/core/src/main/kotlin/me/rhunk/snapenhance/core/features/impl/experiments/ComposerHooks.kt b/core/src/main/kotlin/me/rhunk/snapenhance/core/features/impl/experiments/ComposerHooks.kt index 76470671..3313d66b 100644 --- a/core/src/main/kotlin/me/rhunk/snapenhance/core/features/impl/experiments/ComposerHooks.kt +++ b/core/src/main/kotlin/me/rhunk/snapenhance/core/features/impl/experiments/ComposerHooks.kt @@ -167,7 +167,7 @@ class ComposerHooks: Feature("ComposerHooks", loadParams = FeatureLoadParams.ACT "log" -> { if (argc < 3) return false val logLevel = composerMarshaller.getUntyped(1) as? String ?: return false - val message = (composerMarshaller.getUntyped(2) as? String)?.takeIf { it.length < 1024 * 512 } ?: return false + val message = composerMarshaller.getUntyped(2) as? String ?: return false val tag = "ComposerLogs"