Karya, built on Mon Jul 24 11:39:07 PDT 2017 (patch 33511aca01257b76b88de7c7a2763b7a965c084e)

Safe HaskellNone

LogView.Tail

Contents

Description

Functions to tail a log file, even if it gets rotated.

Synopsis

Documentation

rotate

rotate_logs :: Int -> Int -> IO.FilePath -> IO.IO Handle Source #

Get a file handle for writing log msgs, first rotating logs if necessary.

tail

data Handle Source #

The Handle remembers the file and the last file size so it can detect when the logs have been rotated.

Instances

open Source #

Arguments

:: 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