Safe Haskell | Safe-Inferred |
---|
Functions to tail a log file, even if it gets rotated.
Synopsis
- log_filename :: IO.IO IO.FilePath
- data Handle
- open :: IO.FilePath -> Maybe Integer -> IO.IO Handle
- tail :: Handle -> IO.IO (Log.Msg, Handle)
- deserialize_line :: ByteString.ByteString -> Log.Msg
- starting_msg :: Text
- quitting_msg :: Text
Documentation
tail
The Handle remembers the file and the last file size so it can detect when the logs have been rotated.
:: IO.FilePath | |
-> Maybe Integer | No seek if Nothing, else seek n*200 bytes from end. TODO this should be the number of lines, but I'm too lazy to do that right. |
-> IO.IO Handle |
magic
starting_msg :: Text Source #
quitting_msg :: Text Source #