diff options
author | Jasper Van der Jeugt <m@jaspervdj.be> | 2012-11-21 20:41:19 +0100 |
---|---|---|
committer | Jasper Van der Jeugt <m@jaspervdj.be> | 2012-11-21 20:41:19 +0100 |
commit | aa1762f78ee5d0c5700d43a1e0363f96c4cfe617 (patch) | |
tree | 6bef56eb9dcc57016ee2419de482ba85ba8d6b3a | |
parent | c32e57262b1c4544c323ea04c21608aef1126765 (diff) | |
download | hakyll-aa1762f78ee5d0c5700d43a1e0363f96c4cfe617.tar.gz |
Don't use a verbose logger when running tests
-rw-r--r-- | src/Hakyll/Core/Configuration.hs | 11 | ||||
-rw-r--r-- | src/Hakyll/Core/Runtime.hs | 2 | ||||
-rw-r--r-- | tests/TestSuite/Util.hs | 1 |
3 files changed, 11 insertions, 3 deletions
diff --git a/src/Hakyll/Core/Configuration.hs b/src/Hakyll/Core/Configuration.hs index df73e01..d57eb2e 100644 --- a/src/Hakyll/Core/Configuration.hs +++ b/src/Hakyll/Core/Configuration.hs @@ -8,8 +8,12 @@ module Hakyll.Core.Configuration -------------------------------------------------------------------------------- -import Data.List (isPrefixOf, isSuffixOf) -import System.FilePath (takeFileName) +import Data.List (isPrefixOf, isSuffixOf) +import System.FilePath (takeFileName) + + +-------------------------------------------------------------------------------- +import Hakyll.Core.Logger -------------------------------------------------------------------------------- @@ -52,6 +56,8 @@ data Configuration = Configuration , -- | Use an in-memory cache for items. This is faster but uses more -- memory. inMemoryCache :: Bool + -- | Verbosity for the logger + , verbosity :: Verbosity } @@ -65,6 +71,7 @@ defaultConfiguration = Configuration , ignoreFile = ignoreFile' , deployCommand = "echo 'No deploy command specified'" , inMemoryCache = True + , verbosity = Message } where ignoreFile' path diff --git a/src/Hakyll/Core/Runtime.hs b/src/Hakyll/Core/Runtime.hs index dba2af9..96b21cd 100644 --- a/src/Hakyll/Core/Runtime.hs +++ b/src/Hakyll/Core/Runtime.hs @@ -44,7 +44,7 @@ import Hakyll.Core.Writable run :: Configuration -> Rules a -> IO RuleSet run config rules = do -- Initialization - logger <- Logger.new Logger.Debug putStrLn + logger <- Logger.new (verbosity config) putStrLn Logger.header logger "Initialising..." Logger.message logger "Creating store..." store <- Store.new (inMemoryCache config) $ storeDirectory config diff --git a/tests/TestSuite/Util.hs b/tests/TestSuite/Util.hs index 8f0911d..6c07c50 100644 --- a/tests/TestSuite/Util.hs +++ b/tests/TestSuite/Util.hs @@ -109,4 +109,5 @@ withTestConfiguration f = do { destinationDirectory = "_testsite" , storeDirectory = "_teststore" , providerDirectory = "tests/data" + , verbosity = Logger.Error } |