--debug is passed along to git-annex-shell when git-annex is in debug mode.

This commit is contained in:
Joey Hess 2015-08-13 15:05:39 -04:00
parent 34c848381f
commit 43aa881b47
5 changed files with 28 additions and 19 deletions

View file

@ -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