--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
|
@ -49,7 +49,6 @@ import Network.Socket (SockAddr, HostName)
|
|||
import Data.Text (pack, unpack)
|
||||
import qualified Network.Wai.Handler.WarpTLS as TLS
|
||||
import Network.Wai.Middleware.RequestLogger
|
||||
import System.Log.Logger
|
||||
|
||||
mkYesodDispatch "WebApp" $(parseRoutesFile "Assistant/WebApp/routes")
|
||||
|
||||
|
@ -138,9 +137,3 @@ getTlsSettings = do
|
|||
#else
|
||||
return Nothing
|
||||
#endif
|
||||
|
||||
{- Checks if debugging is actually enabled. -}
|
||||
debugEnabled :: IO Bool
|
||||
debugEnabled = do
|
||||
l <- getRootLogger
|
||||
return $ getLevel l <= Just DEBUG
|
||||
|
|
|
@ -30,7 +30,7 @@ data PrefsForm = PrefsForm
|
|||
, numCopies :: Int
|
||||
, autoStart :: Bool
|
||||
, autoUpgrade :: AutoUpgrade
|
||||
, debugEnabled :: Bool
|
||||
, enableDebug :: Bool
|
||||
}
|
||||
|
||||
prefsAForm :: PrefsForm -> MkAForm PrefsForm
|
||||
|
@ -44,7 +44,7 @@ prefsAForm d = PrefsForm
|
|||
<*> areq (selectFieldList autoUpgradeChoices)
|
||||
(bfs autoUpgradeLabel) (Just $ autoUpgrade d)
|
||||
<*> areq (checkBoxField `withNote` debugnote)
|
||||
"Enable debug logging" (Just $ debugEnabled d)
|
||||
"Enable debug logging" (Just $ enableDebug d)
|
||||
where
|
||||
diskreservenote = [whamlet|<br>Avoid downloading files from other repositories when there is too little free disk space.|]
|
||||
numcopiesnote = [whamlet|<br>Only drop a file after verifying that other repositories contain this many copies.|]
|
||||
|
@ -98,8 +98,8 @@ storePrefs p = do
|
|||
liftIO $ if autoStart p
|
||||
then addAutoStartFile here
|
||||
else removeAutoStartFile here
|
||||
setConfig (annexConfig "debug") (boolConfig $ debugEnabled p)
|
||||
liftIO $ if debugEnabled p
|
||||
setConfig (annexConfig "debug") (boolConfig $ enableDebug p)
|
||||
liftIO $ if enableDebug p
|
||||
then enableDebugOutput
|
||||
else disableDebugOutput
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue