annex.debug can now be set to enable debug logging by default. The webapp's debugging check box does this.
This commit is contained in:
parent
9200e9a5f9
commit
fa1c1e0f65
7 changed files with 33 additions and 7 deletions
10
Messages.hs
10
Messages.hs
|
@ -31,7 +31,9 @@ module Messages (
|
|||
showCustom,
|
||||
showHeader,
|
||||
showRaw,
|
||||
setupConsole
|
||||
setupConsole,
|
||||
enableDebugOutput,
|
||||
disableDebugOutput
|
||||
) where
|
||||
|
||||
import Text.JSON
|
||||
|
@ -220,6 +222,12 @@ setupConsole = do
|
|||
fileEncoding stdout
|
||||
fileEncoding stderr
|
||||
|
||||
enableDebugOutput :: IO ()
|
||||
enableDebugOutput = updateGlobalLogger rootLoggerName $ setLevel DEBUG
|
||||
|
||||
disableDebugOutput :: IO ()
|
||||
disableDebugOutput = updateGlobalLogger rootLoggerName $ setLevel NOTICE
|
||||
|
||||
handle :: IO () -> IO () -> Annex ()
|
||||
handle json normal = withOutputType go
|
||||
where
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue