Skip to content

Commit c2b6296

Browse files
committed
improvement: Send debug logs to BSP client
Previously, we would only print the logs when using Bloop from CLI
1 parent 7cc9fab commit c2b6296

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

frontend/src/main/scala/bloop/logging/BspServerLogger.scala

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,15 @@ final class BspServerLogger private (
5353

5454
override def ansiCodesSupported: Boolean = ansiSupported || underlying.ansiCodesSupported()
5555

56-
override private[logging] def printDebug(msg: String): Unit = underlying.printDebug(msg)
56+
override private[logging] def printDebug(msg: String): Unit = {
57+
if (isVerbose)
58+
client.notify(
59+
Build.logMessage,
60+
bsp.LogMessageParams(bsp.MessageType.Log, None, originId, msg)
61+
)
62+
underlying.printDebug(msg)
63+
64+
}
5765
override def debug(msg: String)(implicit ctx: DebugFilter): Unit =
5866
if (debugFilter.isEnabledFor(ctx)) printDebug(msg)
5967

0 commit comments

Comments
 (0)