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

Instances details

Bounded LogLevel |
Instance details Defined in System.Logging.Facade.Types Methods minBound :: LogLevel maxBound :: LogLevel
Enum LogLevel |
Instance details Defined in System.Logging.Facade.Types Methods succ :: LogLevel -> LogLevel pred :: LogLevel -> LogLevel toEnum :: Int -> LogLevel fromEnum :: LogLevel -> Int enumFrom :: LogLevel -> [LogLevel] enumFromThen :: LogLevel -> LogLevel -> [LogLevel] enumFromTo :: LogLevel -> LogLevel -> [LogLevel] enumFromThenTo :: LogLevel -> LogLevel -> LogLevel -> [LogLevel]
Eq LogLevel |
Instance details Defined in System.Logging.Facade.Types Methods (==) :: LogLevel -> LogLevel -> Bool (/=) :: LogLevel -> LogLevel -> Bool
Ord LogLevel |
Instance details Defined in System.Logging.Facade.Types Methods compare :: LogLevel -> LogLevel -> Ordering (<) :: LogLevel -> LogLevel -> Bool (<=) :: LogLevel -> LogLevel -> Bool (>) :: LogLevel -> LogLevel -> Bool (>=) :: LogLevel -> LogLevel -> Bool max :: LogLevel -> LogLevel -> LogLevel min :: LogLevel -> LogLevel -> LogLevel
Read LogLevel |
Instance details Defined in System.Logging.Facade.Types Methods readsPrec :: Int -> ReadS LogLevel # readList :: ReadS [LogLevel] # readPrec :: ReadPrec LogLevel # readListPrec :: ReadPrec [LogLevel] #
Show LogLevel |
Instance details Defined in System.Logging.Facade.Types Methods showsPrec :: Int -> LogLevel -> ShowS show :: LogLevel -> String showList :: [LogLevel] -> ShowS