Add logging to Js5ChannelHandler

Signed-off-by: Graham <gpe@openrs2.org>
pull/132/head
Graham 3 years ago
parent d67a5e690f
commit fdd0f118f2
  1. 7
      archive/src/main/kotlin/org/openrs2/archive/cache/Js5ChannelHandler.kt

@ -1,5 +1,6 @@
package org.openrs2.archive.cache
import com.github.michaelbull.logging.InlineLogger
import io.netty.bootstrap.Bootstrap
import io.netty.buffer.ByteBuf
import io.netty.channel.ChannelHandler
@ -64,6 +65,8 @@ public class Js5ChannelHandler(
while (inFlightRequests.size < maxInFlightRequests) {
val request = pendingRequests.removeFirstOrNull() ?: break
inFlightRequests += request
logger.info { "Requesting archive ${request.archive} group ${request.group}" }
ctx.write(request, ctx.voidPromise())
flush = true
@ -199,4 +202,8 @@ public class Js5ChannelHandler(
groups.forEach(CacheImporter.Group::release)
groups.clear()
}
private companion object {
private val logger = InlineLogger()
}
}

Loading…
Cancel
Save