summaryrefslogtreecommitdiff
path: root/Propellor/Message.hs
diff options
context:
space:
mode:
authorJoey Hess2014-04-01 11:59:48 -0400
committerJoey Hess2014-04-01 11:59:48 -0400
commite02f802ac848fe9395d9a7019b4041eca814b0c9 (patch)
tree5d155413c22200754ae4927474aac5ff4f311c75 /Propellor/Message.hs
parentbf4ba055287f46d6e125d8fd7870dd981d224fc8 (diff)
add PROPELLOR_DEBUG
Diffstat (limited to 'Propellor/Message.hs')
-rw-r--r--Propellor/Message.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/Propellor/Message.hs b/Propellor/Message.hs
index 90163649..c15661a7 100644
--- a/Propellor/Message.hs
+++ b/Propellor/Message.hs
@@ -2,6 +2,7 @@ module Propellor.Message where
import System.Console.ANSI
import System.IO
+import System.Log.Logger
import Propellor.Types
@@ -35,3 +36,7 @@ errorMessage :: String -> IO a
errorMessage s = do
warningMessage s
error "Propellor failed!"
+
+-- | Causes a debug message to be displayed when PROPELLOR_DEBUG=1
+debug :: [String] -> IO ()
+debug = debugM "propellor" . unwords