packages feed

katip 0.8.3.0 → 0.8.4.0

raw patch · 4 files changed

+31/−10 lines, 4 filesdep ~Win32dep ~unliftio-corePVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: Win32, unliftio-core

API changes (from Hackage documentation)

- Katip: itemApp :: forall a_aeRZ. Lens' (Item a_aeRZ) Namespace
+ Katip: itemApp :: forall a_af4x. Lens' (Item a_af4x) Namespace
- Katip: itemEnv :: forall a_aeRZ. Lens' (Item a_aeRZ) Environment
+ Katip: itemEnv :: forall a_af4x. Lens' (Item a_af4x) Environment
- Katip: itemHost :: forall a_aeRZ. Lens' (Item a_aeRZ) HostName
+ Katip: itemHost :: forall a_af4x. Lens' (Item a_af4x) HostName
- Katip: itemLoc :: forall a_aeRZ. Lens' (Item a_aeRZ) (Maybe Loc)
+ Katip: itemLoc :: forall a_af4x. Lens' (Item a_af4x) (Maybe Loc)
- Katip: itemMessage :: forall a_aeRZ. Lens' (Item a_aeRZ) LogStr
+ Katip: itemMessage :: forall a_af4x. Lens' (Item a_af4x) LogStr
- Katip: itemNamespace :: forall a_aeRZ. Lens' (Item a_aeRZ) Namespace
+ Katip: itemNamespace :: forall a_af4x. Lens' (Item a_af4x) Namespace
- Katip: itemPayload :: forall a_aeRZ a_ale0. Lens (Item a_aeRZ) (Item a_ale0) a_aeRZ a_ale0
+ Katip: itemPayload :: forall a_af4x a_alqZ. Lens (Item a_af4x) (Item a_alqZ) a_af4x a_alqZ
- Katip: itemProcess :: forall a_aeRZ. Lens' (Item a_aeRZ) ProcessID
+ Katip: itemProcess :: forall a_af4x. Lens' (Item a_af4x) ProcessID
- Katip: itemSeverity :: forall a_aeRZ. Lens' (Item a_aeRZ) Severity
+ Katip: itemSeverity :: forall a_af4x. Lens' (Item a_af4x) Severity
- Katip: itemThread :: forall a_aeRZ. Lens' (Item a_aeRZ) ThreadIdText
+ Katip: itemThread :: forall a_af4x. Lens' (Item a_af4x) ThreadIdText
- Katip: itemTime :: forall a_aeRZ. Lens' (Item a_aeRZ) UTCTime
+ Katip: itemTime :: forall a_af4x. Lens' (Item a_af4x) UTCTime
- Katip.Core: itemApp :: forall a_aeRZ. Lens' (Item a_aeRZ) Namespace
+ Katip.Core: itemApp :: forall a_af4x. Lens' (Item a_af4x) Namespace
- Katip.Core: itemEnv :: forall a_aeRZ. Lens' (Item a_aeRZ) Environment
+ Katip.Core: itemEnv :: forall a_af4x. Lens' (Item a_af4x) Environment
- Katip.Core: itemHost :: forall a_aeRZ. Lens' (Item a_aeRZ) HostName
+ Katip.Core: itemHost :: forall a_af4x. Lens' (Item a_af4x) HostName
- Katip.Core: itemLoc :: forall a_aeRZ. Lens' (Item a_aeRZ) (Maybe Loc)
+ Katip.Core: itemLoc :: forall a_af4x. Lens' (Item a_af4x) (Maybe Loc)
- Katip.Core: itemMessage :: forall a_aeRZ. Lens' (Item a_aeRZ) LogStr
+ Katip.Core: itemMessage :: forall a_af4x. Lens' (Item a_af4x) LogStr
- Katip.Core: itemNamespace :: forall a_aeRZ. Lens' (Item a_aeRZ) Namespace
+ Katip.Core: itemNamespace :: forall a_af4x. Lens' (Item a_af4x) Namespace
- Katip.Core: itemPayload :: forall a_aeRZ a_ale0. Lens (Item a_aeRZ) (Item a_ale0) a_aeRZ a_ale0
+ Katip.Core: itemPayload :: forall a_af4x a_alqZ. Lens (Item a_af4x) (Item a_alqZ) a_af4x a_alqZ
- Katip.Core: itemProcess :: forall a_aeRZ. Lens' (Item a_aeRZ) ProcessID
+ Katip.Core: itemProcess :: forall a_af4x. Lens' (Item a_af4x) ProcessID
- Katip.Core: itemSeverity :: forall a_aeRZ. Lens' (Item a_aeRZ) Severity
+ Katip.Core: itemSeverity :: forall a_af4x. Lens' (Item a_af4x) Severity
- Katip.Core: itemThread :: forall a_aeRZ. Lens' (Item a_aeRZ) ThreadIdText
+ Katip.Core: itemThread :: forall a_af4x. Lens' (Item a_af4x) ThreadIdText
- Katip.Core: itemTime :: forall a_aeRZ. Lens' (Item a_aeRZ) UTCTime
+ Katip.Core: itemTime :: forall a_af4x. Lens' (Item a_af4x) UTCTime

Files

changelog.md view
@@ -1,3 +1,7 @@+0.8.4.0+=======+* Add support for unliftio-core 0.2 while maintaining backwards-compatible support for 0.1+ 0.8.3.0 ======= 
katip.cabal view
@@ -1,5 +1,5 @@ name:                katip-version:             0.8.3.0+version:             0.8.4.0 synopsis:            A structured logging framework. description:   Katip is a structured logging framework. See README.md for more details.@@ -87,7 +87,7 @@   if flag(lib-Werror)     ghc-options: -Werror   if os(windows)-    build-depends: Win32 >=2.3 && <2.6+    build-depends: Win32 >=2.3 && <2.9     exposed-modules: Katip.Compat   else     build-depends: unix >= 2.5 && <2.8
src/Katip/Core.hs view
@@ -901,9 +901,14 @@   restoreM = defaultRestoreM  instance MonadUnliftIO m => MonadUnliftIO (KatipT m) where+#if MIN_VERSION_unliftio_core(0, 2, 0)+  withRunInIO inner = KatipT $ ReaderT $ \le -> withRunInIO $ \run ->+    inner (run . runKatipT le)+#else   askUnliftIO = KatipT $-                withUnliftIO $ \u ->-                pure (UnliftIO (unliftIO u . unKatipT))+    withUnliftIO $ \u ->+      pure (UnliftIO (unliftIO u . unKatipT))+#endif  #if MIN_VERSION_base(4, 9, 0) instance MF.MonadFail m => MF.MonadFail (KatipT m) where@@ -1012,7 +1017,7 @@ logException a ns sev action = action `catchAny` \e -> f e >> throwM e   where     f e = logF a ns sev (msg e)-    msg e = ls (T.pack "An exception has occured: ") <> showLS e+    msg e = ls (T.pack "An exception has occurred: ") <> showLS e   -------------------------------------------------------------------------------
src/Katip/Monadic.hs view
@@ -315,7 +315,7 @@ logExceptionM action sev = action `catchAny` \e -> f e >> throwM e   where     f e = logFM sev (msg e)-    msg e = ls ("An exception has occured: " :: Text) Semi.<> showLS e+    msg e = ls ("An exception has occurred: " :: Text) Semi.<> showLS e   -------------------------------------------------------------------------------@@ -395,10 +395,16 @@   localKatipNamespace f (KatipContextT m) = KatipContextT $ local (\s -> s { ltsNamespace = f (ltsNamespace s)}) m  instance MonadUnliftIO m => MonadUnliftIO (KatipContextT m) where+#if MIN_VERSION_unliftio_core(0, 2, 0)+  withRunInIO inner = KatipContextT $ ReaderT $ \lts -> withRunInIO $ \run ->+    inner (run . runKatipContextT (ltsLogEnv lts) (ltsContext lts) (ltsNamespace lts))+#else   askUnliftIO = KatipContextT $-                withUnliftIO $ \u ->-                pure (UnliftIO (unliftIO u . unKatipContextT))+    withUnliftIO $ \u ->+      pure (UnliftIO (unliftIO u . unKatipContextT))+#endif + #if MIN_VERSION_base(4, 9, 0) instance MF.MonadFail m => MF.MonadFail (KatipContextT m) where     fail msg = lift (MF.fail msg)@@ -482,9 +488,15 @@      restoreM = NoLoggingT . restoreM  instance MonadUnliftIO m => MonadUnliftIO (NoLoggingT m) where+#if MIN_VERSION_unliftio_core(0, 2, 0)+  withRunInIO inner = NoLoggingT $ withRunInIO $ \run ->+    inner (run . runNoLoggingT)+#else   askUnliftIO = NoLoggingT $-                withUnliftIO $ \u ->-                pure (UnliftIO (unliftIO u . runNoLoggingT))+    withUnliftIO $ \u ->+      pure (UnliftIO (unliftIO u . runNoLoggingT))+#endif+  instance MonadIO m => Katip (NoLoggingT m) where   getLogEnv = liftIO (initLogEnv "NoLoggingT" "no-logging")