In order to mitigate against the brute force attacks against Gitlab accounts, we are moving to all edu-ID Logins. We would like to remind you to link your account with your edu-id. Login will be possible only by edu-ID after November 30, 2021. Here you can find the instructions for linking your account.

If you don't have a SWITCH edu-ID, you can create one with this guide here

kind regards

This Server has been upgraded to GitLab release 14.2.6

Commit 409cdf6d authored by Jonas Waeber's avatar Jonas Waeber
Browse files

Add additional logging!

parent 4a5e73b4
Pipeline #27692 passed with stages
in 3 minutes and 28 seconds
......@@ -47,6 +47,9 @@ class Service(file: String = "app.yml") {
val collector = ReportCollector(importApiUrl)
fun run() {
log.info("Begin reading from topic ${settings.inputTopic} on kafka cluster.")
log.info("Sending aggregated reports to ${importApiUrl}.")
log.info("Reading the following steps: ${stepWhitelist.str()}")
while (true) {
consumer.consume()
.mapNotNull { klaxon.parse<IndexReport>(it.value()) }
......
package org.memobase
import org.apache.logging.log4j.LogManager
import java.io.File
import java.nio.charset.Charset
class StepWhitelist(path: String) {
private val log = LogManager.getLogger(this::class.java)
private val whitelist = File(path).readLines(Charset.defaultCharset())
fun check(step: String): Boolean {
return whitelist.contains(step)
return if (whitelist.contains(step)) {
log.info("Step $step is present in whitelist. Processing report.")
true
} else {
log.info("Step $step is not present in whitelist. Not processing.")
false
}
}
fun str(): String {
return whitelist.joinToString(", ")
}
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment