@@ -82,7 +82,7 @@ esTests :: TestTree
82esTests = testGroup "elasticsearch scribe"
82esTests = testGroup "elasticsearch scribe"
84 withSearch' (\c -> c { essIndexSharding = NoIndexSharding}) $ \setup -> testCase "it flushes to elasticsearch" $ withTestLogging setup $ \done -> do
84 withSearch' (\c -> c { essIndexSharding = NoIndexSharding}) $ \setup -> testCase "it flushes to elasticsearch" $ withTestLogging setup $ \done -> do
85− $(logT) (ExampleCtx True) mempty InfoS "A test message"
85+ logT (ExampleCtx True) mempty InfoS "A test message"
86 liftIO $ do
86 liftIO $ do
88 logs <- getLogs
88 logs <- getLogs
@@ -94,10 +94,10 @@ esTests = testGroup "elasticsearch scribe"
94 let t1 = mkTime 2016 1 2 3 4 5
94 let t1 = mkTime 2016 1 2 3 4 5
95 fakeClock <- newTVarIO t1
95 fakeClock <- newTVarIO t1
96 withTestLogging' (set logEnvTimer (readTVarIO fakeClock)) setup $ \done -> do
96 withTestLogging' (set logEnvTimer (readTVarIO fakeClock)) setup $ \done -> do
97− $(logT) (ExampleCtx True) mempty InfoS "today"
97+ logT (ExampleCtx True) mempty InfoS "today"
98 let t2 = mkTime 2016 1 3 3 4 5
98 let t2 = mkTime 2016 1 3 3 4 5
99 liftIO (atomically (writeTVar fakeClock t2))
99 liftIO (atomically (writeTVar fakeClock t2))
100− $(logT) (ExampleCtx True) mempty InfoS "tomorrow"
100+ logT (ExampleCtx True) mempty InfoS "tomorrow"
101 liftIO $ do
101 liftIO $ do
102 void done
102 void done
103 todayLogs <- getLogsByIndex (IndexName "katip-elasticsearch-tests-2016-1-2")
103 todayLogs <- getLogsByIndex (IndexName "katip-elasticsearch-tests-2016-1-2")
@@ -112,10 +112,10 @@ esTests = testGroup "elasticsearch scribe"
112 let t1 = mkTime 2016 3 5 0 0 0 -- saturday, march 5th
112 let t1 = mkTime 2016 3 5 0 0 0 -- saturday, march 5th
113 fakeClock <- newTVarIO t1
113 fakeClock <- newTVarIO t1
114 withTestLogging' (set logEnvTimer (readTVarIO fakeClock)) setup $ \done -> do
114 withTestLogging' (set logEnvTimer (readTVarIO fakeClock)) setup $ \done -> do
115− $(logT) (ExampleCtx True) mempty InfoS "today"
115+ logT (ExampleCtx True) mempty InfoS "today"
116 let t2 = mkTime 2016 3 6 0 0 0 -- sunday march 6th
116 let t2 = mkTime 2016 3 6 0 0 0 -- sunday march 6th
117 liftIO (atomically (writeTVar fakeClock t2))
117 liftIO (atomically (writeTVar fakeClock t2))
118− $(logT) (ExampleCtx True) mempty InfoS "tomorrow"
118+ logT (ExampleCtx True) mempty InfoS "tomorrow"
119 liftIO $ do
119 liftIO $ do
120 void done
120 void done
121 todayLogs <- getLogsByIndex (IndexName "katip-elasticsearch-tests-2016-2-28") -- rounds back to previous sunday
121 todayLogs <- getLogsByIndex (IndexName "katip-elasticsearch-tests-2016-2-28") -- rounds back to previous sunday