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 5
5
6
6
module DummyServer where
7
7
8
+ import Colog.Core qualified as L
8
9
import Control.Monad
9
10
import Control.Monad.Reader
10
11
import Data.Aeson hiding (Null , defaultOptions )
@@ -26,6 +27,7 @@ import UnliftIO.Concurrent
26
27
27
28
withDummyServer :: ((Handle , Handle ) -> IO () ) -> IO ()
28
29
withDummyServer f = do
30
+ let logger = L. cmap show L. logStringStderr
29
31
(hinRead, hinWrite) <- createPipe
30
32
(houtRead, houtWrite) <- createPipe
31
33
@@ -47,7 +49,7 @@ withDummyServer f = do
47
49
}
48
50
49
51
bracket
50
- (forkIO $ void $ runServerWithHandles mempty mempty hinRead houtWrite definition)
52
+ (forkIO $ void $ runServerWithHandles logger ( L. hoistLogAction liftIO logger) hinRead houtWrite definition)
51
53
killThread
52
54
(const $ f (hinWrite, houtRead))
53
55
You can’t perform that action at this time.
0 commit comments