mirror of
https://gitlab.com/mangadex-pub/mangadex_at_home.git
synced 2024-01-19 02:48:37 +00:00
Normalize log levels
This commit is contained in:
parent
87822dd5d3
commit
f649c97eb1
|
@ -141,7 +141,7 @@ class ImageServer(
|
|||
val mdResponse = client(Request(Method.GET, sanitizedUri))
|
||||
|
||||
if (mdResponse.status != Status.OK) {
|
||||
LOGGER.trace { "Upstream query for $sanitizedUri errored with status ${mdResponse.status}" }
|
||||
LOGGER.warn { "Upstream query for $sanitizedUri errored with status ${mdResponse.status}" }
|
||||
|
||||
mdResponse.close()
|
||||
return Response(mdResponse.status)
|
||||
|
@ -159,7 +159,7 @@ class ImageServer(
|
|||
|
||||
// bad upstream responses mean we can't cache, so bail
|
||||
if (contentLength == null || lastModified == null) {
|
||||
LOGGER.trace { "Request for $sanitizedUri is being served due to upstream issues" }
|
||||
LOGGER.info { "Request for $sanitizedUri is being served due to upstream issues" }
|
||||
return respondWithImage(mdResponse.body.stream, contentLength, contentType, lastModified, false)
|
||||
}
|
||||
|
||||
|
@ -170,7 +170,7 @@ class ImageServer(
|
|||
// A null writer means that this file is being written to
|
||||
// concurrently so we skip the cache process
|
||||
return if (writer != null) {
|
||||
LOGGER.trace { "Request for $sanitizedUri is being cached and served" }
|
||||
LOGGER.info { "Request for $sanitizedUri is being cached and served" }
|
||||
|
||||
val tee = CachingInputStream(
|
||||
mdResponse.body.stream,
|
||||
|
@ -180,7 +180,7 @@ class ImageServer(
|
|||
if (writer.commit(contentLength)) {
|
||||
LOGGER.info { "Cache download for $sanitizedUri committed" }
|
||||
} else {
|
||||
LOGGER.warn { "Cache download for $sanitizedUri aborted" }
|
||||
LOGGER.info { "Cache download for $sanitizedUri aborted" }
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
LOGGER.warn(e) { "Cache go/no go for $sanitizedUri failed" }
|
||||
|
@ -188,7 +188,7 @@ class ImageServer(
|
|||
}
|
||||
respondWithImage(tee, contentLength, contentType, lastModified, false)
|
||||
} else {
|
||||
LOGGER.trace { "Request for $sanitizedUri is being served" }
|
||||
LOGGER.info { "Request for $sanitizedUri is being served" }
|
||||
respondWithImage(mdResponse.body.stream, contentLength, contentType, lastModified, false)
|
||||
}
|
||||
}
|
||||
|
@ -284,8 +284,8 @@ fun getServer(
|
|||
}
|
||||
)
|
||||
|
||||
return addCommonHeaders()
|
||||
.then(timeRequest())
|
||||
return timeRequest()
|
||||
.then(addCommonHeaders())
|
||||
.then(catchAllHideDetails())
|
||||
.then(
|
||||
routes(
|
||||
|
|
Loading…
Reference in a new issue