polysemy-log 0.3.0.1 → 0.3.0.2
raw patch · 3 files changed
+11/−9 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- lib/Polysemy/Log.hs +4/−2
- lib/Polysemy/Log/Stdout.hs +6/−6
- polysemy-log.cabal +1/−1
lib/Polysemy/Log.hs view
@@ -74,14 +74,16 @@ interpretDataLogStderrWith, interpretLogStderr, interpretLogStderr',- interpretLogStderrWith, interpretLogStderrConc+ interpretLogStderrConc,+ interpretLogStderrWith, ) import Polysemy.Log.Stdout ( interpretDataLogStdout, interpretDataLogStdoutWith, interpretLogStdout, interpretLogStdout',- interpretLogStdoutWith, interpretLogStdoutConc+ interpretLogStdoutConc,+ interpretLogStdoutWith, ) -- $intro
lib/Polysemy/Log/Stdout.hs view
@@ -14,16 +14,16 @@ import Polysemy.Log.Format (formatLogEntry) import Polysemy.Log.Log (interpretDataLog, interpretLogDataLog, interpretLogDataLogConc) --- |Interpret 'DataLog' by printing to stderr, converting messages to 'Text' with the supplied function.+-- |Interpret 'DataLog' by printing to stdout, converting messages to 'Text' with the supplied function. interpretDataLogStdoutWith :: Member (Embed IO) r => (a -> Text) -> InterpreterFor (DataLog a) r interpretDataLogStdoutWith fmt =- interpretDataLog \ msg -> embed (Text.hPutStrLn stderr (fmt msg))+ interpretDataLog \ msg -> embed (Text.hPutStrLn stdout (fmt msg)) {-# INLINE interpretDataLogStdoutWith #-} --- |Interpret 'DataLog' by printing to stderr, converting messages to 'Text' by using 'Show'.+-- |Interpret 'DataLog' by printing to stdout, converting messages to 'Text' by using 'Show'. interpretDataLogStdout :: Show a => Member (Embed IO) r =>@@ -32,7 +32,7 @@ interpretDataLogStdoutWith show {-# INLINE interpretDataLogStdout #-} --- |Interpret 'Log' by printing to stderr, converting messages to 'Text' with the supplied function.+-- |Interpret 'Log' by printing to stdout, converting messages to 'Text' with the supplied function. interpretLogStdoutWith :: Members [Embed IO, GhcTime] r => (LogEntry LogMessage -> Text) ->@@ -44,7 +44,7 @@ raiseUnder2 {-# INLINE interpretLogStdoutWith #-} --- |Interpret 'Log' by printing to stderr, using the default formatter.+-- |Interpret 'Log' by printing to stdout, using the default formatter. -- -- Since this adds a timestamp, it has a dependency on 'GhcTime'. -- Use 'interpretLogStdout'' for a variant that interprets 'GhcTime' in-place.@@ -55,7 +55,7 @@ interpretLogStdoutWith formatLogEntry {-# INLINE interpretLogStdout #-} --- |Interpret 'Log' by printing to stderr, using the default formatter, then interpreting 'GhcTime'.+-- |Interpret 'Log' by printing to stdout, using the default formatter, then interpreting 'GhcTime'. interpretLogStdout' :: Member (Embed IO) r => InterpreterFor Log r
polysemy-log.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack name: polysemy-log-version: 0.3.0.1+version: 0.3.0.2 synopsis: Polysemy Effects for Logging description: See <https://hackage.haskell.org/package/polysemy-log/docs/Polysemy-Log.html> category: Logging