Karya, built on 2018-05-31T02:46:59 (patch 0a1a35479c514820d77330ae8a978975ba22a47a)

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
Show Handle # 
Instance details

Defined in LogView.Tail

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