packages feed

katip 0.5.3.0 → 0.5.4.0

raw patch · 3 files changed

+19/−3 lines, 3 filesdep ~resourcetdep ~template-haskellPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: resourcet, template-haskell

API changes (from Hackage documentation)

+ Katip.Monadic: askLoggerIO :: (Applicative m, KatipContext m) => m (Severity -> LogStr -> IO ())
- Katip: itemApp :: forall a_aepw. Lens' (Item a_aepw) Namespace
+ Katip: itemApp :: forall a_affZ. Lens' (Item a_affZ) Namespace
- Katip: itemEnv :: forall a_aepw. Lens' (Item a_aepw) Environment
+ Katip: itemEnv :: forall a_affZ. Lens' (Item a_affZ) Environment
- Katip: itemHost :: forall a_aepw. Lens' (Item a_aepw) HostName
+ Katip: itemHost :: forall a_affZ. Lens' (Item a_affZ) HostName
- Katip: itemLoc :: forall a_aepw. Lens' (Item a_aepw) (Maybe Loc)
+ Katip: itemLoc :: forall a_affZ. Lens' (Item a_affZ) (Maybe Loc)
- Katip: itemMessage :: forall a_aepw. Lens' (Item a_aepw) LogStr
+ Katip: itemMessage :: forall a_affZ. Lens' (Item a_affZ) LogStr
- Katip: itemNamespace :: forall a_aepw. Lens' (Item a_aepw) Namespace
+ Katip: itemNamespace :: forall a_affZ. Lens' (Item a_affZ) Namespace
- Katip: itemPayload :: forall a_aepw a_alp1. Lens (Item a_aepw) (Item a_alp1) a_aepw a_alp1
+ Katip: itemPayload :: forall a_affZ a_aluE. Lens (Item a_affZ) (Item a_aluE) a_affZ a_aluE
- Katip: itemProcess :: forall a_aepw. Lens' (Item a_aepw) ProcessID
+ Katip: itemProcess :: forall a_affZ. Lens' (Item a_affZ) ProcessID
- Katip: itemSeverity :: forall a_aepw. Lens' (Item a_aepw) Severity
+ Katip: itemSeverity :: forall a_affZ. Lens' (Item a_affZ) Severity
- Katip: itemThread :: forall a_aepw. Lens' (Item a_aepw) ThreadIdText
+ Katip: itemThread :: forall a_affZ. Lens' (Item a_affZ) ThreadIdText
- Katip: itemTime :: forall a_aepw. Lens' (Item a_aepw) UTCTime
+ Katip: itemTime :: forall a_affZ. Lens' (Item a_affZ) UTCTime
- Katip.Core: itemApp :: forall a_aepw. Lens' (Item a_aepw) Namespace
+ Katip.Core: itemApp :: forall a_affZ. Lens' (Item a_affZ) Namespace
- Katip.Core: itemEnv :: forall a_aepw. Lens' (Item a_aepw) Environment
+ Katip.Core: itemEnv :: forall a_affZ. Lens' (Item a_affZ) Environment
- Katip.Core: itemHost :: forall a_aepw. Lens' (Item a_aepw) HostName
+ Katip.Core: itemHost :: forall a_affZ. Lens' (Item a_affZ) HostName
- Katip.Core: itemLoc :: forall a_aepw. Lens' (Item a_aepw) (Maybe Loc)
+ Katip.Core: itemLoc :: forall a_affZ. Lens' (Item a_affZ) (Maybe Loc)
- Katip.Core: itemMessage :: forall a_aepw. Lens' (Item a_aepw) LogStr
+ Katip.Core: itemMessage :: forall a_affZ. Lens' (Item a_affZ) LogStr
- Katip.Core: itemNamespace :: forall a_aepw. Lens' (Item a_aepw) Namespace
+ Katip.Core: itemNamespace :: forall a_affZ. Lens' (Item a_affZ) Namespace
- Katip.Core: itemPayload :: forall a_aepw a_alp1. Lens (Item a_aepw) (Item a_alp1) a_aepw a_alp1
+ Katip.Core: itemPayload :: forall a_affZ a_aluE. Lens (Item a_affZ) (Item a_aluE) a_affZ a_aluE
- Katip.Core: itemProcess :: forall a_aepw. Lens' (Item a_aepw) ProcessID
+ Katip.Core: itemProcess :: forall a_affZ. Lens' (Item a_affZ) ProcessID
- Katip.Core: itemSeverity :: forall a_aepw. Lens' (Item a_aepw) Severity
+ Katip.Core: itemSeverity :: forall a_affZ. Lens' (Item a_affZ) Severity
- Katip.Core: itemThread :: forall a_aepw. Lens' (Item a_aepw) ThreadIdText
+ Katip.Core: itemThread :: forall a_affZ. Lens' (Item a_affZ) ThreadIdText
- Katip.Core: itemTime :: forall a_aepw. Lens' (Item a_aepw) UTCTime
+ Katip.Core: itemTime :: forall a_affZ. Lens' (Item a_affZ) UTCTime

Files

changelog.md view
@@ -1,3 +1,8 @@+0.5.4.0+=======+* Loosen bounds on resourcet and template-haskell.+* Add convenience function askLoggerIO.+ 0.5.3.0 ======= * Add MonadUnliftIO instances.
katip.cabal view
@@ -1,5 +1,5 @@ name:                katip-version:             0.5.3.0+version:             0.5.4.0 synopsis:            A structured logging framework. description:   Katip is a structured logging framework. See README.md for more details.@@ -64,7 +64,7 @@                , hostname >=1.0 && <1.1                , old-locale >= 1.0 && < 1.1                , string-conv >= 0.1 && < 0.2-               , template-haskell >= 2.8 && < 2.13+               , template-haskell >= 2.8 && < 2.14                , text >= 0.11 && <1.3                , time >= 1 && < 1.9                , transformers >= 0.3 && < 0.6@@ -73,7 +73,7 @@                , monad-control >= 1.0 && < 1.1                , mtl >= 2.0 && < 2.3                , transformers-base >= 0.3 && < 0.6-               , resourcet >= 1.1 && < 1.2+               , resourcet >= 1.1 && < 1.3                , scientific >= 0.3.3.0                , microlens >= 0.2.0.0 && < 0.5                , microlens-th >= 0.1.0.0 && < 0.5
src/Katip/Monadic.hs view
@@ -35,6 +35,7 @@     , katipAddContext     , KatipContextTState(..)     , NoLoggingT+    , askLoggerIO     ) where  @@ -486,3 +487,13 @@   localKatipContext = const id   getKatipNamespace = pure mempty   localKatipNamespace = const id+++-- | Convenience function for when you have to integrate with a third+-- party API that takes a generic logging function as an argument.+askLoggerIO :: (Applicative m, KatipContext m) => m (Severity -> LogStr -> IO ())+askLoggerIO = do+  ctx <- getKatipContext+  ns <- getKatipNamespace+  logEnv <- getLogEnv+  pure (\sev msg -> runKatipT logEnv $ logF ctx ns sev msg)