mirror of
https://github.com/corda/corda.git
synced 2025-01-22 20:38:05 +00:00
Added logging to static web server.
This commit is contained in:
parent
912cccc5a4
commit
71d9709662
@ -123,11 +123,14 @@ class InterestRateSwapAPI(val services: ServiceHub) {
|
||||
if(resource != null) {
|
||||
val cacheControl = CacheControl();
|
||||
cacheControl.maxAge = TimeUnit.SECONDS.toSeconds(0).toInt()
|
||||
logger.info("200: serving ${filepath}")
|
||||
return Response.ok(resource).cacheControl(cacheControl).build()
|
||||
}
|
||||
|
||||
logger.info("404: could not find: ${filepath}")
|
||||
return Response.status(Response.Status.NOT_FOUND).build()
|
||||
} catch(ex: Exception) {
|
||||
logger.info("500: error when serving: ${filepath}. ${ex.toString()}")
|
||||
return Response.status(Response.Status.INTERNAL_SERVER_ERROR).build()
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user