added --debugfilter (and annex.debugfilter)
This commit is contained in:
parent
aaba83795b
commit
1b645e1ace
9 changed files with 65 additions and 14 deletions
14
Messages.hs
14
Messages.hs
|
@ -258,13 +258,17 @@ setupConsole = do
|
|||
hSetBuffering stdout LineBuffering
|
||||
hSetBuffering stderr LineBuffering
|
||||
|
||||
enableDebugOutput :: IO ()
|
||||
enableDebugOutput :: Annex ()
|
||||
enableDebugOutput = do
|
||||
dd <- debugDisplayer
|
||||
configureDebug dd (DebugSelector (\_ -> True))
|
||||
names <- map encodeBS . annexDebugFilter <$> Annex.getGitConfig
|
||||
let selector
|
||||
| null names = const True
|
||||
| otherwise = \(DebugSource s) -> any (`S.isInfixOf` s) names
|
||||
dd <- liftIO debugDisplayer
|
||||
liftIO $ configureDebug dd (DebugSelector selector)
|
||||
|
||||
disableDebugOutput :: IO ()
|
||||
disableDebugOutput = do
|
||||
disableDebugOutput :: Annex ()
|
||||
disableDebugOutput = liftIO $ do
|
||||
dd <- debugDisplayer
|
||||
configureDebug dd (DebugSelector (\_ -> False))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue