diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-08-13 15:05:39 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-08-13 15:05:39 -0400 |
commit | 43aa881b47b3362f7f5cda3a5301177784fcfe47 (patch) | |
tree | e2f4c994512b94048c274222afd187d07a37f6c9 /Messages.hs | |
parent | 34c848381f6287eb22c81d02c6f08e6fe96745ca (diff) |
--debug is passed along to git-annex-shell when git-annex is in debug mode.
Diffstat (limited to 'Messages.hs')
-rw-r--r-- | Messages.hs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Messages.hs b/Messages.hs index c6d033402d..026fca51e6 100644 --- a/Messages.hs +++ b/Messages.hs @@ -32,6 +32,7 @@ module Messages ( setupConsole, enableDebugOutput, disableDebugOutput, + debugEnabled, commandProgressDisabled, ) where @@ -191,6 +192,12 @@ enableDebugOutput = updateGlobalLogger rootLoggerName $ setLevel DEBUG disableDebugOutput :: IO () disableDebugOutput = updateGlobalLogger rootLoggerName $ setLevel NOTICE +{- Checks if debugging is enabled. -} +debugEnabled :: IO Bool +debugEnabled = do + l <- getRootLogger + return $ getLevel l <= Just DEBUG + {- Should commands that normally output progress messages have that - output disabled? -} commandProgressDisabled :: Annex Bool |