Revert "use existing debug machinery for explain"

This reverts commit 409572c9e4.
This commit is contained in:
Joey Hess 2023-07-25 15:53:50 -04:00
parent 409572c9e4
commit cf40e2d4b6
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
3 changed files with 16 additions and 49 deletions

View file

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