Give a hint to askLoggerIO
commit78dd44f2b0486789ef2e6aa7d4305c93cf5982eb
authorMichael Xavier <michael@michaelxavier.net>
dateThu 15 Mar 2018, 11:52 (9 years ago)
parent7313316
katip/src/Katip/Monadic.hs+3
@@ -488,6 +488,9 @@ instance MonadIO m => KatipContext (NoLoggingT m) where
488488 getKatipNamespace = pure mempty
489489 localKatipNamespace = const id
490490
491+
492+-- | Convenience function for when you have to integrate with a third
493+-- party API that takes a generic logging function as an argument.
491494askLoggerIO :: (Applicative m, KatipContext m) => m (Severity -> LogStr -> IO ())
492495askLoggerIO = do
493496 ctx <- getKatipContext