Skip to content

Commit 8f85012

Browse files
committed
InventoryRequest toLogContext
1 parent d77d2e1 commit 8f85012

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/main/kotlin/com/lambda/interaction/request/inventory/InventoryRequest.kt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@
1717

1818
package com.lambda.interaction.request.inventory
1919

20+
import com.lambda.interaction.request.LogContext
21+
import com.lambda.interaction.request.LogContext.Companion.buildLogContext
2022
import com.lambda.interaction.request.Request
2123

2224
class InventoryRequest(
2325
override val config: InventoryConfig
24-
) : Request(), InventoryConfig by config {
26+
) : Request(), InventoryConfig by config, LogContext {
2527
override val requestID = ++requestCount
2628

2729
override val done: Boolean
@@ -30,6 +32,13 @@ class InventoryRequest(
3032
override fun submit(queueIfClosed: Boolean) =
3133
InventoryManager.request(this, queueIfClosed)
3234

35+
override fun toLogContext() =
36+
buildLogContext {
37+
text("Inventory Request:")
38+
pushTab()
39+
text("Request ID: $requestID")
40+
}
41+
3342
companion object {
3443
var requestCount = 0
3544
}

0 commit comments

Comments
 (0)