File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 55
66module DummyServer where
77
8+ import Colog.Core qualified as L
89import Control.Monad
910import Control.Monad.Reader
1011import Data.Aeson hiding (Null , defaultOptions )
@@ -26,6 +27,7 @@ import UnliftIO.Concurrent
2627
2728withDummyServer :: ((Handle , Handle ) -> IO () ) -> IO ()
2829withDummyServer 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
You can’t perform that action at this time.
0 commit comments