summaryrefslogtreecommitdiff
path: root/Assistant/Common.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-07-20 19:29:59 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-07-20 19:29:59 -0400
commitb48d7747a3ac8bea7d58e8fff8faf791f98699c0 (patch)
treef5662f9161fd3c74c2f6467be270651d92ac3ead /Assistant/Common.hs
parent42e73537d1977eac2da2760647e9131f5c9b9eed (diff)
debugging improvements
add timestamps to debug messages Add lots of debug output in the assistant's threads.
Diffstat (limited to 'Assistant/Common.hs')
-rw-r--r--Assistant/Common.hs21
1 files changed, 21 insertions, 0 deletions
diff --git a/Assistant/Common.hs b/Assistant/Common.hs
new file mode 100644
index 000000000..c1a346e75
--- /dev/null
+++ b/Assistant/Common.hs
@@ -0,0 +1,21 @@
+{- Common infrastructure for the git-annex assistant threads.
+ -
+ - Copyright 2012 Joey Hess <joey@kitenet.net>
+ -
+ - Licensed under the GNU GPL version 3 or higher.
+ -}
+
+module Assistant.Common (
+ module X,
+ ThreadName,
+ debug
+) where
+
+import Common.Annex as X
+
+import System.Log.Logger
+
+type ThreadName = String
+
+debug :: ThreadName -> [String] -> IO ()
+debug threadname ws = debugM threadname $ unwords $ (threadname ++ ":") : ws