Various packaging tweaks, documentation, etc.
This commit is contained in:
@@ -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 {
|
||||
|
@@ -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 {
|
||||
|
@@ -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
|
||||
}
|
||||
}
|
||||
|
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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")
|
||||
}
|
||||
|
Reference in New Issue
Block a user