Various packaging tweaks, documentation, etc.

This commit is contained in:
Claude Brisson
2024-04-13 00:55:38 +02:00
parent 837661e4b0
commit 2d0e3b48a5
12 changed files with 351 additions and 10 deletions

View File

@@ -19,7 +19,7 @@ object EGFRatingsHandler: RatingsHandler(RatingsManager.Ratings.EGF) {
}.mapNotNullTo(Json.MutableArray()) {
val match = linePattern.matchEntire(it)
if (match == null) {
logger.error("could not parse line: $it")
logger.debug("could not parse line: $it")
null
} else {
val pairs = groups.map {

View File

@@ -17,7 +17,7 @@ object FFGRatingsHandler: RatingsHandler(RatingsManager.Ratings.FFG) {
payload.lines().mapNotNullTo(Json.MutableArray()) { line ->
val match = linePattern.matchEntire(line)
if (match == null) {
logger.error("could not parse line: $line")
logger.debug("could not parse line: $line")
null
} else {
val pairs = groups.map {

View File

@@ -110,7 +110,8 @@ abstract class RatingsHandler(val origin: RatingsManager.Ratings) {
return response.body!!.source().readString(contentType?.charset() ?: defaultCharset())
}
} catch (ioe: IOException) {
logger.error("Could not refresh ${origin.name} ratings from ${url}", ioe)
logger.error("Could not refresh ${origin.name} ratings from ${url}: ${ioe.javaClass.name} ${ioe.message}")
logger.debug("Could not refresh ${origin.name} ratings from ${url}", ioe)
return null
}
}

View File

@@ -95,7 +95,8 @@ object RatingsManager: Runnable {
}
} catch (e: Exception) {
logger.error("could not build or refresh index", e)
logger.error("could not build or refresh index: ${e.javaClass.name} ${e.message}")
logger.debug("could not build or refresh index", e)
}
}
}

View File

@@ -41,6 +41,16 @@ class WebappManager : BaseWebappManager("View Webapp", "view") {
else -> throw Error("Unhandled auth: $auth")
}
logger.info("")
logger.info("*****************************************************************")
logger.info("* *")
logger.info("* Web server is ready. *");
logger.info("* Open a browser on http://localhost:8080 to access Pairgoth. *")
logger.info("* Press control-c to stop the server when you are done. *")
logger.info("* *")
logger.info("*****************************************************************")
logger.info("")
registerService("ratings", RatingsManager)
startService("ratings")
}