[O] Better logging

This commit is contained in:
Azalea
2024-02-22 23:50:58 -05:00
parent eccdd73908
commit bb53d1448b
3 changed files with 17 additions and 15 deletions

View File

@@ -13,7 +13,6 @@ import org.springframework.web.bind.annotation.RequestBody
import org.springframework.web.bind.annotation.RequestHeader
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RequestParam
import org.springframework.web.server.ResponseStatusException
typealias RP = RequestParam
typealias RB = RequestBody
@@ -42,4 +41,6 @@ val HTTP = HttpClient(CIO) {
}
}
fun Long.toHex(len: Int = 16): Str = "0x${this.toString(len).padStart(len, '0').uppercase()}"
suspend fun <T> async(block: suspend kotlinx.coroutines.CoroutineScope.() -> T): T = withContext(Dispatchers.IO) { block() }