Release v0.9.21: the watcher's reach into origin is visible

Also fixes the log-capture test added with step 19: the test JVM logs at
WARN, so the INFO line reporting the recovered fetch never reached the
appender. The helper now lowers the level explicitly.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
mhoennig
2026-08-30 11:19:42 +02:00
co-authored by Claude Opus 5
parent e4e4cd1899
commit 0229081570
3 changed files with 22 additions and 2 deletions
@@ -1,5 +1,6 @@
package de.hoennig.gittally.watcher
import ch.qos.logback.classic.Level
import ch.qos.logback.classic.Logger
import ch.qos.logback.classic.spi.ILoggingEvent
import ch.qos.logback.core.read.ListAppender
@@ -773,11 +774,16 @@ class WatcherTest : FunSpec() {
}
}
/** Collects this spec's [Watcher] log messages; the returned lambda reads them at any point. */
/**
* Collects this spec's [Watcher] log messages; the returned lambda reads them at any point.
* The level is lowered explicitly — the test JVM logs at WARN, which would drop the very
* INFO line that says the fetch recovered.
*/
private fun captureWatcherLog(): () -> List<String> {
val logger = LoggerFactory.getLogger(Watcher::class.java) as Logger
val appender = ListAppender<ILoggingEvent>()
appender.start()
logger.level = Level.INFO
logger.addAppender(appender)
return { appender.list.map { it.formattedMessage } }
}