https://kotlinlang.org logo
#ksp
Title
# ksp
c

Charlie Tapping

03/08/2023, 12:31 PM
I have a test which asserts that ksp compilation fails when a certain invariant is broken. The test passes, but the failure I log through to ksp is always printed to stdout. Is there anyway of preventing this? It’s fine for me but for other members of my team they may believe this is a real error when reading CI logs rather than a situation I’m simulating in test.
d

David Rawson

03/10/2023, 7:00 PM
Some other solutions out there have wrapped the
KSPLogger
with their own implementation. So in a test, your implementation could forward to a silent logger and in prod, the implementation could forward to the real
KSPLogger
.
3 Views