packages feed

unclogging 0.1.0.1 → 0.1.0.2

raw patch · 3 files changed

+14/−10 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -7,3 +7,7 @@ ## 0.1.0.1 -- 2024-09-23  * Some documentation updates and add tested-with stanza++## 0.1.0.2 -- 2024-09-24++* more tiny documentatoin changes
README.md view
@@ -38,8 +38,8 @@   let subs = [colourSubscriber Info stdout, simpleSubscriber Fatal stderr, fileSubscriber Debug "bla.log"]    withLoggingWithSubscribers subs \logger -> do-    info logger "info"-    debug logger "some important debug info"+    $info logger "info"+    $debug logger "some important debug info" ```  ## example for use with `fused-effects` and `aeson` frontend@@ -60,15 +60,15 @@   -- as you can see, we don't have to pass around the logger explicitly, which makes it a bit more concise and    -- also a tad more safe    runUnclogging subs do-    info ["msg" .= String "hello world"]-    debug ["msg" .= String "message with number", "number" .= Number 1]+    $info ["msg" .= String "hello world"]+    $debug ["msg" .= String "message with number", "number" .= Number 1] ```  ## more verbose example with multiple threads involved  ```haskell import Unclog-import Unclog.Json qualified as Log+import Unclog.Json  import Data.Aeson import UnliftIO@@ -82,12 +82,12 @@   withLoggingWithSubscribers subs \logger -> do     -- spawn a couple of tasks that write to the logger channel concurrently     let spawnTask (i :: Int) = do-          $Log.info logger ["msg" .= String ("I am task " <> fromString (show i))]+          $info logger ["msg" .= String ("I am task " <> fromString (show i))]           replicateM_ 2 do             replicateM_ 2 do-              $Log.debug logger ["msg" .= String ("debugging from " <> fromString (show i))]-            $Log.warn logger ["warning" .= String ("warning from " <> fromString (show i))]-          $Log.fatal logger ["error" .= String ("fatal from " <> fromString (show i))]+              $debug logger ["msg" .= String ("debugging from " <> fromString (show i))]+            $warn logger ["warning" .= String ("warning from " <> fromString (show i))]+          $fatal logger ["error" .= String ("fatal from " <> fromString (show i))]     void $ runConcurrently $ traverse @[] (Concurrently . spawnTask) [1 .. 5] ``` 
unclogging.cabal view
@@ -1,6 +1,6 @@ cabal-version:   3.4 name:            unclogging-version:         0.1.0.1+version:         0.1.0.2 synopsis:   a library which implements easy, concurrent and pretty logging