packages feed

log-base 0.7.3.0 → 0.7.4.0

raw patch · 3 files changed

+18/−4 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Log.Logger: mkBulkLogger' :: Int -> Int -> Text -> ([LogMessage] -> IO ()) -> IO () -> IO Logger

Files

CHANGELOG.md view
@@ -1,3 +1,6 @@+# log-base-0.7.4.0 (2017-10-27)+* Add `mkBulkLogger'` ([#40](https://github.com/scrive/log/pull/40).+ # log-base-0.7.3.0 (2017-10-10) * `BasicStdOutLogger` now flushes stdout on each write. `BulkStdOutLogger`   now flushes stdout on each bulk write ([#38](https://github.com/scrive/log/issues/38)).
log-base.cabal view
@@ -1,5 +1,5 @@ name:                log-base-version:             0.7.3.0+version:             0.7.4.0 synopsis:            Structured logging solution (base package)  description:         A library that provides a way to record structured log
src/Log/Logger.hs view
@@ -3,6 +3,7 @@     Logger   , mkLogger   , mkBulkLogger+  , mkBulkLogger'   , execLogger   , waitForLogger   , shutdownLogger@@ -76,9 +77,19 @@ --    -- in the presence of exceptions in the child thread. -- @ mkBulkLogger :: T.Text -> ([LogMessage] -> IO ()) -> IO () -> IO Logger-mkBulkLogger = mkLoggerImpl-  (newSBQueueIO sbDefaultCapacity) isEmptySBQueue readSBQueue writeSBQueue-  (threadDelay 1000000)+mkBulkLogger = mkBulkLogger' sbDefaultCapacity 1000000++-- | Like 'mkBulkLogger', but with configurable queue size and thread delay.+mkBulkLogger'+    :: Int                      -- ^ queue capacity (default 1000000)+    -> Int                      -- ^ thread delay (microseconds, default 1000000)+    -> T.Text                   -- ^ logger name+    -> ([LogMessage] -> IO ())  -- ^ write+    -> IO ()                    -- ^ flush+    -> IO Logger+mkBulkLogger' cap dur = mkLoggerImpl+  (newSBQueueIO cap) isEmptySBQueue readSBQueue writeSBQueue+  (threadDelay dur)  ----------------------------------------