summaryrefslogtreecommitdiff
path: root/Option.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-06-17 20:41:17 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-06-17 20:41:27 -0400
commitfa8116c070eb695f27e56a1e6384b8ef59bb40d8 (patch)
tree7338a60fc2e6c6e7d22c696006a4bf9cce1b1a7e /Option.hs
parent4dfa412c10bf5811858da509cef8558c8bcc0be3 (diff)
annex.debug can now be set to enable debug logging by default. The webapp's debugging check box does this.
Diffstat (limited to 'Option.hs')
-rw-r--r--Option.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/Option.hs b/Option.hs
index d59af43c7..64ba56f6d 100644
--- a/Option.hs
+++ b/Option.hs
@@ -16,7 +16,6 @@ module Option (
) where
import System.Console.GetOpt
-import System.Log.Logger
import Common.Annex
import qualified Annex
@@ -40,6 +39,8 @@ common =
"enable JSON output"
, Option ['d'] ["debug"] (NoArg setdebug)
"show debug messages"
+ , Option [] ["no-debug"] (NoArg unsetdebug)
+ "don't show debug messages"
, Option ['b'] ["backend"] (ReqArg setforcebackend paramName)
"specify key-value backend to use"
]
@@ -48,7 +49,8 @@ common =
setfast v = Annex.changeState $ \s -> s { Annex.fast = v }
setauto v = Annex.changeState $ \s -> s { Annex.auto = v }
setforcebackend v = Annex.changeState $ \s -> s { Annex.forcebackend = Just v }
- setdebug = liftIO $ updateGlobalLogger rootLoggerName $ setLevel DEBUG
+ setdebug = Annex.changeGitConfig $ \c -> c { annexDebug = True }
+ unsetdebug = Annex.changeGitConfig $ \c -> c { annexDebug = False }
matcher :: [Option]
matcher =