on master help sign in
Don't use a verbose logger when running tests
commitaa1762f78ee5d0c5700d43a1e0363f96c4cfe617 authorJasper Van der Jeugt <m@jaspervdj.be> dateWed 21 Nov 2012, 20:41 (14 years ago) parentc32e572
3 files changed+11−3
src/Hakyll/Core/Configuration.hs+9−2 src/Hakyll/Core/Runtime.hs+1−1 tests/TestSuite/Util.hs+1
src/Hakyll/Core/Configuration.hs+9−2
@@ -8,8 +8,12 @@ module Hakyll.Core.Configuration
88
99
1010--------------------------------------------------------------------------------
11−import Data.List (isPrefixOf, isSuffixOf)
12−import System.FilePath (takeFileName)
11+import Data.List (isPrefixOf, isSuffixOf)
12+import System.FilePath (takeFileName)
13+
14+
15+--------------------------------------------------------------------------------
16+import Hakyll.Core.Logger
1317
1418
1519--------------------------------------------------------------------------------
@@ -52,6 +56,8 @@ data Configuration = Configuration
5256 , -- | Use an in-memory cache for items. This is faster but uses more
5357 -- memory.
5458 inMemoryCache :: Bool
59+ -- | Verbosity for the logger
60+ , verbosity :: Verbosity
5561 }
5662
5763
@@ -65,6 +71,7 @@ defaultConfiguration = Configuration
6571 , ignoreFile = ignoreFile'
6672 , deployCommand = "echo 'No deploy command specified'"
6773 , inMemoryCache = True
74+ , verbosity = Message
6875 }
6976 where
7077 ignoreFile' path
src/Hakyll/Core/Runtime.hs+1−1
@@ -44,7 +44,7 @@ import Hakyll.Core.Writable
4444run :: Configuration -> Rules a -> IO RuleSet
4545run config rules = do
4646 -- Initialization
47− logger <- Logger.new Logger.Debug putStrLn
47+ logger <- Logger.new (verbosity config) putStrLn
4848 Logger.header logger "Initialising..."
4949 Logger.message logger "Creating store..."
5050 store <- Store.new (inMemoryCache config) $ storeDirectory config
tests/TestSuite/Util.hs+1
@@ -109,4 +109,5 @@ withTestConfiguration f = do
109109 { destinationDirectory = "_testsite"
110110 , storeDirectory = "_teststore"
111111 , providerDirectory = "tests/data"
112+ , verbosity = Logger.Error
112113 }