summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Hakyll/Core/Configuration.hs11
-rw-r--r--src/Hakyll/Core/Runtime.hs2
-rw-r--r--tests/TestSuite/Util.hs1
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
}