mockery-0.3.5: Support functions for automated testing

Safe Haskell | None
Language | Haskell2010

Test.Mockery.Logging

Synopsis

- captureLogMessages :: IO a -> IO ([(LogLevel, String)], a)
- captureLogMessages_ :: IO a -> IO [(LogLevel, String)]
- data LogLevel
  - = TRACE
  - | DEBUG
  - | INFO
  - | WARN
  - | ERROR

# Documentation

captureLogMessages :: IO a -> IO ([(LogLevel, String)], a) Source #

Capture all log messages produced by an IO action. Logs are kept in memory.

captureLogMessages_ :: IO a -> IO [(LogLevel, String)] Source #

Like `captureLogsMessages`, but ignores the result.

data LogLevel Source #

Constructors

TRACE |
DEBUG |
INFO |
WARN |
ERROR |

Instances

Bounded LogLevel |
Instance details Defined in System.Logging.Facade.Types Methods minBound :: LogLevel Source # maxBound :: LogLevel Source #
Enum LogLevel |

Instance details

Defined in System.Logging.Facade.Types

Methods

succ :: LogLevel -> LogLevel Source #

pred :: LogLevel -> LogLevel Source #

toEnum :: Int -> LogLevel Source #

fromEnum :: LogLevel -> Int Source #

enumFrom :: LogLevel -> [LogLevel] Source #

enumFromThen :: LogLevel -> LogLevel -> [LogLevel] Source #

enumFromTo :: LogLevel -> LogLevel -> [LogLevel] Source #

enumFromThenTo :: LogLevel -> LogLevel -> LogLevel -> [LogLevel] Source #

Eq LogLevel |
Instance details Defined in System.Logging.Facade.Types Methods (==) :: LogLevel -> LogLevel -> Bool Source # (/=) :: LogLevel -> LogLevel -> Bool Source #
Ord LogLevel |
Instance details Defined in System.Logging.Facade.Types Methods compare :: LogLevel -> LogLevel -> Ordering Source # (<) :: LogLevel -> LogLevel -> Bool Source # (<=) :: LogLevel -> LogLevel -> Bool Source # (>) :: LogLevel -> LogLevel -> Bool Source # (>=) :: LogLevel -> LogLevel -> Bool Source # max :: LogLevel -> LogLevel -> LogLevel Source # min :: LogLevel -> LogLevel -> LogLevel Source #
Read LogLevel |
Instance details Defined in System.Logging.Facade.Types Methods readsPrec :: Int -> ReadS LogLevel Source # readList :: ReadS [LogLevel] Source # readPrec :: ReadPrec LogLevel Source # readListPrec :: ReadPrec [LogLevel] Source #
Show LogLevel |
Instance details Defined in System.Logging.Facade.Types Methods showsPrec :: Int -> LogLevel -> ShowS Source # show :: LogLevel -> String Source # showList :: [LogLevel] -> ShowS Source #