summaryrefslogtreecommitdiff
path: root/Messages.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Messages.hs')
-rw-r--r--Messages.hs10
1 files changed, 9 insertions, 1 deletions
diff --git a/Messages.hs b/Messages.hs
index b2fcba881..0357da12d 100644
--- a/Messages.hs
+++ b/Messages.hs
@@ -31,7 +31,9 @@ module Messages (
showCustom,
showHeader,
showRaw,
- setupConsole
+ setupConsole,
+ enableDebugOutput,
+ disableDebugOutput
) where
import Text.JSON
@@ -220,6 +222,12 @@ setupConsole = do
fileEncoding stdout
fileEncoding stderr
+enableDebugOutput :: IO ()
+enableDebugOutput = updateGlobalLogger rootLoggerName $ setLevel DEBUG
+
+disableDebugOutput :: IO ()
+disableDebugOutput = updateGlobalLogger rootLoggerName $ setLevel NOTICE
+
handle :: IO () -> IO () -> Annex ()
handle json normal = withOutputType go
where