package Ġorg . log capture . kot est Ċ Ċ import Ġorg . log capture . assertion . Expected Logging Message . a Log Ċ import Ġio . kot est . core . spec . style . String Spec Ċ import Ġorg . hamcrest . Matchers . equalTo Ċ import Ġorg . slf 4 j . Logger Ċ import Ġorg . slf 4 j . LoggerFactory Ċ Ċ class ĠLog Capture Listener With Custom Logger Name Spec Ġ: ĠString Spec ({ ĊĊĠ Ġval Ġlog : ĠLogger Ġ= ĠLoggerFactory . getLogger (" CUSTOM - LOGGER ") ĊĊĠ Ġval Ġlog Capture Listener Ġ= ĠLog Capture Listener (" CUSTOM - LOGGER ") ĊĠ Ġlistener ( log Capture Listener ) ĊĊĠ Ġ" verify Ġlog Ġmessages " Ġ{ ĊĠĠĠ Ġlog . info (" a Ġmessage ") ĊĊĠĠĠ Ġlog Capture Listener . logged ( a Log (). info (). with Logger Name ( equalTo (" CUSTOM - LOGGER "))) ĊĠĠĠ Ġlog Capture Listener . logged ( a Log (). info (). with Message (" a Ġmessage ")) ĊĠ Ġ} Ċ }) Ċ