monad-logger 0.3.34 → 0.3.35
raw patch · 4 files changed
+30/−7 lines, 4 files
Files
- ChangeLog.md +5/−0
- Control/Monad/Logger.hs +22/−5
- README.md +1/−0
- monad-logger.cabal +2/−2
ChangeLog.md view
@@ -1,5 +1,10 @@ # ChangeLog for monad-logger +## 0.3.35++* Add Hackage status badge+* Document `Loc` [#26](https://github.com/snoyberg/monad-logger/pull/26)+ ## 0.3.34 * Fix build for lts-9 resolver
Control/Monad/Logger.hs view
@@ -100,6 +100,7 @@ #endif -- * utilities for defining your own loggers , defaultLogStr+ -- $locDocs , Loc (..) , defaultLoc ) where@@ -178,6 +179,22 @@ type LogSource = Text +-- $locDocs+--+-- === Loc+--+-- When @monad-logger@ is compiled with the @template_haskell@ flag set to true (the default), the 'Loc' below is a re-export from the @template-haskell@ package.+-- When the flag is false, the 'Loc' below is a copy of that data structure defined in @monad-logger@ itself.+--+-- If you are making a library that:+--+-- * Uses @monad-logger@+-- * Uses 'Loc' in a type signature+-- * But doesn't need to depend on @template-haskell@ for other reasons+--+-- You can import 'Loc' directly from this package, instead of adding an dependency on @template-haskell@ and importing from there.+-- This allows users to compile your package in environments that don't support @template-haskell@.+ #if WITH_TEMPLATE_HASKELL instance Lift LogLevel where@@ -872,19 +889,19 @@ logOtherN :: MonadLogger m => LogLevel -> Text -> m () logOtherN = logWithoutLoc "" -logDebugNS :: MonadLogger m => Text -> Text -> m ()+logDebugNS :: MonadLogger m => LogSource -> Text -> m () logDebugNS src = logWithoutLoc src LevelDebug -logInfoNS :: MonadLogger m => Text -> Text -> m ()+logInfoNS :: MonadLogger m => LogSource -> Text -> m () logInfoNS src = logWithoutLoc src LevelInfo -logWarnNS :: MonadLogger m => Text -> Text -> m ()+logWarnNS :: MonadLogger m => LogSource -> Text -> m () logWarnNS src = logWithoutLoc src LevelWarn -logErrorNS :: MonadLogger m => Text -> Text -> m ()+logErrorNS :: MonadLogger m => LogSource -> Text -> m () logErrorNS src = logWithoutLoc src LevelError -logOtherNS :: MonadLogger m => Text -> LogLevel -> Text -> m ()+logOtherNS :: MonadLogger m => LogSource -> LogLevel -> Text -> m () logOtherNS = logWithoutLoc #if WITH_CALLSTACK
README.md view
@@ -2,6 +2,7 @@ [](https://travis-ci.org/snoyberg/monad-logger) [](https://ci.appveyor.com/project/snoyberg/monad-logger/branch/master)+[](https://hackage.haskell.org/package/monad-logger) A monad transformer approach for logging.
monad-logger.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 4c723e63ce03c6e1717d2dbde2229b03d803ec328b909536160c9d7e8e5c9583+-- hash: c1da2cf4e6349e1b417f173c13880cb9929fece82971108834a71f9eb72a6d69 name: monad-logger-version: 0.3.34+version: 0.3.35 synopsis: A class of monads which can log messages. description: See README and Haddocks at <https://www.stackage.org/package/monad-logger> category: System