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 | 7ac44206f2acda5721c88e4f5dd1f09384f9f05e (patch) | |
tree | a87a3db319acc7e210693b9224ff482438b5b323 /Messages.hs | |
parent | 4a24dd0e9b1e8edc5db37adf7f305c8369e01d32 (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 c6d033402..026fca51e 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 |