--debug is passed along to git-annex-shell when git-annex is in debug mode.
This commit is contained in:
parent
34c848381f
commit
43aa881b47
5 changed files with 28 additions and 19 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue