Skip to content

Commit 132db94

Browse files
committed
WIP debug
1 parent dacb793 commit 132db94

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lsp-test/test/DummyServer.hs

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
module DummyServer where
77

8+
import Colog.Core qualified as L
89
import Control.Monad
910
import Control.Monad.Reader
1011
import Data.Aeson hiding (Null, defaultOptions)
@@ -26,6 +27,7 @@ import UnliftIO.Concurrent
2627

2728
withDummyServer :: ((Handle, Handle) -> IO ()) -> IO ()
2829
withDummyServer f = do
30+
let logger = L.cmap show L.logStringStderr
2931
(hinRead, hinWrite) <- createPipe
3032
(houtRead, houtWrite) <- createPipe
3133

@@ -47,7 +49,7 @@ withDummyServer f = do
4749
}
4850

4951
bracket
50-
(forkIO $ void $ runServerWithHandles mempty mempty hinRead houtWrite definition)
52+
(forkIO $ void $ runServerWithHandles logger (L.hoistLogAction liftIO logger) hinRead houtWrite definition)
5153
killThread
5254
(const $ f (hinWrite, houtRead))
5355

0 commit comments

Comments
 (0)