summaryrefslogtreecommitdiff
path: root/PresenceLog.hs
diff options
context:
space:
mode:
Diffstat (limited to 'PresenceLog.hs')
-rw-r--r--PresenceLog.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/PresenceLog.hs b/PresenceLog.hs
index 71d78f1ed..0777db209 100644
--- a/PresenceLog.hs
+++ b/PresenceLog.hs
@@ -13,6 +13,7 @@
module PresenceLog (
LogStatus(..),
+ addLog,
readLog,
writeLog,
logNow,
@@ -70,6 +71,11 @@ instance Read LogLine where
bad = ret $ LogLine 0 Undefined ""
ret v = [(v, "")]
+addLog :: FilePath -> LogLine -> Annex ()
+addLog file line = do
+ ls <- readLog file
+ writeLog file (compactLog $ line:ls)
+
{- Reads a log file.
- Note that the LogLines returned may be in any order. -}
readLog :: FilePath -> Annex [LogLine]