mockery-0.3.2: 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 :: *

Constructors

TRACE |
DEBUG |
INFO |
WARN |
ERROR |

Instances

Bounded LogLevel |
Enum LogLevel |
Eq LogLevel |
Ord LogLevel |
Show LogLevel |