fast-logger-3.2.1: A fast logging system
Safe HaskellSafe-Inferred
LanguageHaskell2010

System.Log.FastLogger.File

Synopsis

Documentation

data FileLogSpec Source #

The spec for logging files

Constructors

FileLogSpec 

Fields

data TimedFileLogSpec Source #

The spec for time based rotation. It supports post processing of log files. Does not delete any logs. Example:

timeRotate fname = LogFileTimedRotate
               (TimedFileLogSpec fname timeFormat sametime compressFile)
               defaultBufSize
   where
       timeFormat = "%FT%H%M%S"
       sametime = (==) on C8.takeWhile (/=T)
       compressFile fp = void . forkIO $
           callProcess "tar" [ "--remove-files", "-caf", fp <> ".gz", fp ]

Constructors

TimedFileLogSpec 

Fields

check :: FilePath -> IO () Source #

Checking if a log file can be written.

rotate :: FileLogSpec -> IO () Source #

Rotating log files.

prefixTime :: FormattedTime -> FilePath -> FilePath Source #

Prefix file name with formatted time