diff options
author | Joey Hess <joey@kitenet.net> | 2011-07-01 17:15:46 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-07-01 17:15:46 -0400 |
commit | 6bddebdb79ca8ed168e143d533a6101c7d469628 (patch) | |
tree | fdcd6745973e01e5dcbd1ae4ebd591e92a4046ff /PresenceLog.hs | |
parent | a140f7148f3ea0bef2d8c060c7847b3d1be4d25e (diff) |
add the addurl command
Diffstat (limited to 'PresenceLog.hs')
-rw-r--r-- | PresenceLog.hs | 6 |
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] |