From fdd0f118f2243799e4239186f877b4ff45e7d3d9 Mon Sep 17 00:00:00 2001 From: Graham Date: Wed, 13 Jan 2021 17:54:13 +0000 Subject: [PATCH] Add logging to Js5ChannelHandler Signed-off-by: Graham --- .../kotlin/org/openrs2/archive/cache/Js5ChannelHandler.kt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/archive/src/main/kotlin/org/openrs2/archive/cache/Js5ChannelHandler.kt b/archive/src/main/kotlin/org/openrs2/archive/cache/Js5ChannelHandler.kt index 51a13058..b4259eee 100644 --- a/archive/src/main/kotlin/org/openrs2/archive/cache/Js5ChannelHandler.kt +++ b/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() + } }