Skip to content

Commit

Permalink
version bump, @SInCE note, fixed and improved example, documented log…
Browse files Browse the repository at this point in the history
…THShow
  • Loading branch information
bitemyapp committed Feb 3, 2016
1 parent f758aac commit 537985c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion monad-logger/Control/Monad/Logger.hs
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,9 @@ logTH level =
[|monadLoggerLog $(qLocation >>= liftLoc) (pack "") $(lift level)
. (id :: Text -> Text)|]

-- | Generates a function that takes a 'LogLevel' and a 'Show a => a'.
--
-- @since 0.3.18
logTHShow :: LogLevel -> Q Exp
logTHShow level =
[|monadLoggerLog $(qLocation >>= liftLoc) (pack "") $(lift level)
Expand Down Expand Up @@ -285,7 +288,9 @@ logOther = logTH . LevelOther

-- | Generates a function that takes a 'Show a => a' and logs a 'LevelDebug' message. Usage:
--
-- > $(logDebug) "This is a debug log message"
-- > $(logDebugSH) (Just "This is a debug log message")
--
-- @since 0.3.18
logDebugSH :: Q Exp
logDebugSH = logTHShow LevelDebug

Expand Down
2 changes: 1 addition & 1 deletion monad-logger/monad-logger.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: monad-logger
version: 0.3.17
version: 0.3.18
synopsis: A class of monads which can log messages.
description: Hackage documentation generation is not reliable. For up to date documentation, please see: <http://www.stackage.org/package/monad-logger>.
homepage: https://github.com/kazu-yamamoto/logger
Expand Down

0 comments on commit 537985c

Please sign in to comment.