mirror of
https://gitlab.com/mangadex-pub/mangadex_at_home.git
synced 2024-01-19 02:48:37 +00:00
Change logging messages
This commit is contained in:
parent
a85c70cafd
commit
36a7a46160
|
@ -108,7 +108,7 @@ sealed class NettyTransport(threads: Int) {
|
|||
val name = SystemPropertyUtil.get("os.name").toLowerCase(Locale.UK).trim { it <= ' ' }
|
||||
|
||||
val threadsToUse = if (threads == 0) defaultNumThreads() else threads
|
||||
LOGGER.info { "Choosing a transport using $threadsToUse threads" }
|
||||
LOGGER.info { "Choosing a transport with $threadsToUse threads" }
|
||||
|
||||
if (name.startsWith("linux")) {
|
||||
if (!SystemPropertyUtil.get("no-iouring").toBoolean()) {
|
||||
|
@ -116,7 +116,7 @@ sealed class NettyTransport(threads: Int) {
|
|||
LOGGER.info { "Using IOUring transport" }
|
||||
return IOUringTransport(threadsToUse)
|
||||
} else {
|
||||
LOGGER.info(IOUring.unavailabilityCause()) {
|
||||
LOGGER.info {
|
||||
"IOUring transport not available (this may be normal)"
|
||||
}
|
||||
}
|
||||
|
@ -127,7 +127,7 @@ sealed class NettyTransport(threads: Int) {
|
|||
LOGGER.info { "Using Epoll transport" }
|
||||
return EpollTransport(threadsToUse)
|
||||
} else {
|
||||
LOGGER.info(Epoll.unavailabilityCause()) {
|
||||
LOGGER.info {
|
||||
"Epoll transport not available (this may be normal)"
|
||||
}
|
||||
}
|
||||
|
@ -145,7 +145,7 @@ class Netty(
|
|||
private val serverSettings: ServerSettings,
|
||||
private val statistics: Statistics
|
||||
) : ServerConfig {
|
||||
override fun toServer(httpHandler: HttpHandler): Http4kServer = object : Http4kServer {
|
||||
override fun toServer(http: HttpHandler): Http4kServer = object : Http4kServer {
|
||||
private val transport = NettyTransport.bestForPlatform(serverSettings.threads)
|
||||
|
||||
private lateinit var channel: Channel
|
||||
|
@ -190,7 +190,7 @@ class Netty(
|
|||
)
|
||||
|
||||
ch.pipeline().addLast("streamer", ChunkedWriteHandler())
|
||||
ch.pipeline().addLast(transport.executor, "handler", Http4kChannelHandler(httpHandler))
|
||||
ch.pipeline().addLast(transport.executor, "handler", Http4kChannelHandler(http))
|
||||
|
||||
ch.pipeline().addLast(
|
||||
"exceptions",
|
||||
|
@ -219,7 +219,7 @@ class Netty(
|
|||
transport.shutdownGracefully()
|
||||
}
|
||||
|
||||
override fun port(): Int = serverSettings.port
|
||||
override fun port(): Int = (channel.localAddress() as InetSocketAddress).port
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
|
Loading…
Reference in a new issue