packages feed

katip 0.8.8.1 → 0.8.8.2

raw patch · 3 files changed

+20/−3 lines, 3 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

+ Katip.Core: decimalToText :: Integral a => a -> Text
- Katip: itemApp :: forall a_abaT. Lens' (Item a_abaT) Namespace
+ Katip: itemApp :: forall a_abb1. Lens' (Item a_abb1) Namespace
- Katip: itemEnv :: forall a_abaT. Lens' (Item a_abaT) Environment
+ Katip: itemEnv :: forall a_abb1. Lens' (Item a_abb1) Environment
- Katip: itemHost :: forall a_abaT. Lens' (Item a_abaT) HostName
+ Katip: itemHost :: forall a_abb1. Lens' (Item a_abb1) HostName
- Katip: itemLoc :: forall a_abaT. Lens' (Item a_abaT) (Maybe Loc)
+ Katip: itemLoc :: forall a_abb1. Lens' (Item a_abb1) (Maybe Loc)
- Katip: itemMessage :: forall a_abaT. Lens' (Item a_abaT) LogStr
+ Katip: itemMessage :: forall a_abb1. Lens' (Item a_abb1) LogStr
- Katip: itemNamespace :: forall a_abaT. Lens' (Item a_abaT) Namespace
+ Katip: itemNamespace :: forall a_abb1. Lens' (Item a_abb1) Namespace
- Katip: itemPayload :: forall a_abaT a_ae8P. Lens (Item a_abaT) (Item a_ae8P) a_abaT a_ae8P
+ Katip: itemPayload :: forall a_abb1 a_ae9O. Lens (Item a_abb1) (Item a_ae9O) a_abb1 a_ae9O
- Katip: itemProcess :: forall a_abaT. Lens' (Item a_abaT) ProcessID
+ Katip: itemProcess :: forall a_abb1. Lens' (Item a_abb1) ProcessID
- Katip: itemSeverity :: forall a_abaT. Lens' (Item a_abaT) Severity
+ Katip: itemSeverity :: forall a_abb1. Lens' (Item a_abb1) Severity
- Katip: itemThread :: forall a_abaT. Lens' (Item a_abaT) ThreadIdText
+ Katip: itemThread :: forall a_abb1. Lens' (Item a_abb1) ThreadIdText
- Katip: itemTime :: forall a_abaT. Lens' (Item a_abaT) UTCTime
+ Katip: itemTime :: forall a_abb1. Lens' (Item a_abb1) UTCTime
- Katip.Core: itemApp :: forall a_abaT. Lens' (Item a_abaT) Namespace
+ Katip.Core: itemApp :: forall a_abb1. Lens' (Item a_abb1) Namespace
- Katip.Core: itemEnv :: forall a_abaT. Lens' (Item a_abaT) Environment
+ Katip.Core: itemEnv :: forall a_abb1. Lens' (Item a_abb1) Environment
- Katip.Core: itemHost :: forall a_abaT. Lens' (Item a_abaT) HostName
+ Katip.Core: itemHost :: forall a_abb1. Lens' (Item a_abb1) HostName
- Katip.Core: itemLoc :: forall a_abaT. Lens' (Item a_abaT) (Maybe Loc)
+ Katip.Core: itemLoc :: forall a_abb1. Lens' (Item a_abb1) (Maybe Loc)
- Katip.Core: itemMessage :: forall a_abaT. Lens' (Item a_abaT) LogStr
+ Katip.Core: itemMessage :: forall a_abb1. Lens' (Item a_abb1) LogStr
- Katip.Core: itemNamespace :: forall a_abaT. Lens' (Item a_abaT) Namespace
+ Katip.Core: itemNamespace :: forall a_abb1. Lens' (Item a_abb1) Namespace
- Katip.Core: itemPayload :: forall a_abaT a_ae8P. Lens (Item a_abaT) (Item a_ae8P) a_abaT a_ae8P
+ Katip.Core: itemPayload :: forall a_abb1 a_ae9O. Lens (Item a_abb1) (Item a_ae9O) a_abb1 a_ae9O
- Katip.Core: itemProcess :: forall a_abaT. Lens' (Item a_abaT) ProcessID
+ Katip.Core: itemProcess :: forall a_abb1. Lens' (Item a_abb1) ProcessID
- Katip.Core: itemSeverity :: forall a_abaT. Lens' (Item a_abaT) Severity
+ Katip.Core: itemSeverity :: forall a_abb1. Lens' (Item a_abb1) Severity
- Katip.Core: itemThread :: forall a_abaT. Lens' (Item a_abaT) ThreadIdText
+ Katip.Core: itemThread :: forall a_abb1. Lens' (Item a_abb1) ThreadIdText
- Katip.Core: itemTime :: forall a_abaT. Lens' (Item a_abaT) UTCTime
+ Katip.Core: itemTime :: forall a_abb1. Lens' (Item a_abb1) UTCTime

Files

changelog.md view
@@ -1,3 +1,7 @@+0.8.8.2+=======+* Performance improvements [#152](https://github.com/Soostone/katip/pull/152)+ 0.8.8.1 ======= * Improve logging performance (4x) via inlining [#151](https://github.com/Soostone/katip/pull/151)
katip.cabal view
@@ -1,5 +1,5 @@ name:                katip-version:             0.8.8.1+version:             0.8.8.2 synopsis:            A structured logging framework. description:   Katip is a structured logging framework. See README.md for more details.
src/Katip/Core.hs view
@@ -69,14 +69,15 @@ #endif import           Data.List import qualified Data.Map.Strict                   as M-import           Data.Maybe                        (fromMaybe) import           Data.Semigroup                    as SG import qualified Data.Set                          as Set import           Data.String import           Data.String.Conv import           Data.Text                         (Text) import qualified Data.Text                         as T+import qualified Data.Text.Lazy                    as TL import qualified Data.Text.Lazy.Builder            as B+import qualified Data.Text.Lazy.Builder.Int        as B import           Data.Time import           GHC.Generics                      hiding (to) #if MIN_VERSION_base(4, 8, 0)@@ -96,6 +97,12 @@ import           System.Posix #endif +#if MIN_VERSION_base(4, 19, 0)+import           GHC.Conc.Sync                     (fromThreadId)+#else+import           Data.Maybe                        (fromMaybe)+#endif+ -------------------------------------------------------------------------------  @@ -106,6 +113,8 @@               _   -> Nothing -- Ambiguous parse {-# INLINE readMay #-} +decimalToText :: Integral a => a -> Text+decimalToText = TL.toStrict . B.toLazyText . B.decimal  ------------------------------------------------------------------------------- -- | Represents a heirarchy of namespaces going from general to@@ -269,9 +278,13 @@   mkThreadIdText :: ThreadId -> ThreadIdText+#if MIN_VERSION_base(4, 19, 0)+mkThreadIdText = ThreadIdText . decimalToText . fromThreadId+#else mkThreadIdText = ThreadIdText . stripPrefix' "ThreadId " . T.pack . show   where     stripPrefix' pfx t = fromMaybe t (T.stripPrefix pfx t)+#endif {-# INLINE mkThreadIdText #-}  -------------------------------------------------------------------------------@@ -407,7 +420,7 @@   processIDToText :: ProcessID -> Text-processIDToText = toS . show+processIDToText = decimalToText {-# INLINE processIDToText #-}