diff --git a/mockery.cabal b/mockery.cabal
--- a/mockery.cabal
+++ b/mockery.cabal
@@ -3,7 +3,7 @@
 -- see: https://github.com/sol/hpack
 
 name:           mockery
-version:        0.1.0
+version:        0.2.0
 synopsis:       Support functions for automated testing
 description:    Support functions for automated testing
 category:       Testing
@@ -24,10 +24,12 @@
   hs-source-dirs: src
   exposed-modules:
       Test.Mockery.Directory
+      Test.Mockery.Logging
   build-depends:
       base == 4.*
     , temporary
     , directory
+    , logging-facade
   ghc-options: -Wall
   default-language: Haskell2010
 
@@ -37,10 +39,12 @@
   main-is: Spec.hs
   other-modules:
       Test.Mockery.DirectorySpec
+      Test.Mockery.LoggingSpec
   build-depends:
       base == 4.*
     , temporary
     , directory
+    , logging-facade
 
     , mockery
     , hspec == 2.*
diff --git a/src/Test/Mockery/Logging.hs b/src/Test/Mockery/Logging.hs
new file mode 100644
--- /dev/null
+++ b/src/Test/Mockery/Logging.hs
@@ -0,0 +1,29 @@
+{-# LANGUAGE RecordWildCards #-}
+module Test.Mockery.Logging (
+  captureLogMessages
+, captureLogMessages_
+) where
+
+import           Control.Applicative
+import           Control.Exception
+import           Data.IORef
+import           System.Logging.Facade.Types
+import           System.Logging.Facade.Sink
+
+-- | Capture all log messages produced by an IO action.
+-- Logs are kept in memory.
+captureLogMessages :: IO a -> IO ([(LogLevel, String)], a)
+captureLogMessages action = bracket getLogSink setLogSink act
+  where
+    logToRef ref record = atomicModifyIORef' ref $ \logs -> (record : logs, ())
+    unwrap LogRecord{..} = (logRecordLevel, logRecordMessage)
+    act _  = do
+      ref <- newIORef []
+      setLogSink $ logToRef ref
+      val <- action
+      logs <- readIORef ref
+      return (unwrap <$> reverse logs, val)
+
+-- | Like 'captureLogsMessages', but ignores the result.
+captureLogMessages_ :: IO a -> IO [(LogLevel, String)]
+captureLogMessages_ action = fst <$> captureLogMessages action
diff --git a/test/Test/Mockery/LoggingSpec.hs b/test/Test/Mockery/LoggingSpec.hs
new file mode 100644
--- /dev/null
+++ b/test/Test/Mockery/LoggingSpec.hs
@@ -0,0 +1,29 @@
+module Test.Mockery.LoggingSpec (spec) where
+
+import Test.Hspec
+import Data.IORef
+import System.Logging.Facade.Types
+import System.Logging.Facade.Sink
+import System.Logging.Facade as Log
+
+import Test.Mockery.Logging
+
+spec :: Spec
+spec = describe "captureLogs" $ do
+  let logToIORef :: IORef [LogRecord] -> LogSink
+      logToIORef ref record = modifyIORef ref (record :)
+
+  it "returns all log messages of an action" $ do
+    (logs, ()) <- captureLogMessages $ do
+      Log.trace "this should be captured"
+      Log.trace "this should be captured next"
+    logs `shouldBe` [ (TRACE, "this should be captured")
+                    , (TRACE, "this should be captured next")
+                    ]
+
+  it "restores the original log sink" $ do
+    ref <- newIORef []
+    setLogSink $ logToIORef ref
+    _ <- captureLogMessages $ Log.trace "this should be captured"
+    Log.trace "this should not be captured"
+    readIORef ref `shouldReturn` [LogRecord TRACE Nothing "this should not be captured"]
