Revert "use existing debug machinery for explain"
This reverts commit 409572c9e4
.
This commit is contained in:
parent
409572c9e4
commit
cf40e2d4b6
3 changed files with 16 additions and 49 deletions
|
@ -1,6 +1,6 @@
|
|||
{- git-annex debugging
|
||||
-
|
||||
- Copyright 2021-2023 Joey Hess <id@joeyh.name>
|
||||
- Copyright 2021 Joey Hess <id@joeyh.name>
|
||||
-
|
||||
- Licensed under the GNU AGPL version 3 or higher.
|
||||
-}
|
||||
|
@ -8,11 +8,8 @@
|
|||
module Annex.Debug (
|
||||
DebugSelector(..),
|
||||
DebugSource(..),
|
||||
RawDebugMessage(..),
|
||||
debug,
|
||||
debug',
|
||||
fastDebug,
|
||||
fastDebug',
|
||||
configureDebug,
|
||||
debugSelectorFromGitConfig,
|
||||
parseDebugSelector,
|
||||
|
@ -20,7 +17,7 @@ module Annex.Debug (
|
|||
|
||||
import Common
|
||||
import qualified Annex
|
||||
import Utility.Debug hiding (fastDebug, fastDebug')
|
||||
import Utility.Debug hiding (fastDebug)
|
||||
import qualified Utility.Debug
|
||||
import Annex.Debug.Utility
|
||||
|
||||
|
@ -28,11 +25,7 @@ import Annex.Debug.Utility
|
|||
-- is read from the Annex monad, which avoids any IORef access overhead
|
||||
-- when debugging is not enabled.
|
||||
fastDebug :: DebugSource -> String -> Annex.Annex ()
|
||||
fastDebug = fastDebug'
|
||||
|
||||
fastDebug' :: DebugMessage msg => DebugSource -> msg -> Annex.Annex ()
|
||||
fastDebug' src msg = do
|
||||
fastDebug src msg = do
|
||||
rd <- Annex.getRead id
|
||||
when (Annex.debugenabled rd) $
|
||||
liftIO $ Utility.Debug.fastDebug' (Annex.debugselector rd) src msg
|
||||
|
||||
liftIO $ Utility.Debug.fastDebug (Annex.debugselector rd) src msg
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue