wkenzow
wkenzow

Reputation: 68

How to adapt an Sbt Logger to a PrintStream

I'm writing an Sbt plugin and I need to call some api that require a PrintStream for loggin the output. There is a way to adapt an sbt Logger (taken from streams.value.log) to a PrintStream that use for example the error level of the Logger?

Upvotes: 0

Views: 88

Answers (1)

jq170727
jq170727

Reputation: 14663

In sbt.util.internal it appears there's a LoggerWriter used in LogWriterTest.
Perhaps you can use that and adapt it to a PrintStream.

Upvotes: 1

Related Questions