| Copyright | (c) Amy de Buitléir 2011-2016 |
|---|---|
| License | BSD-style |
| Maintainer | amy@nualeargais.ie |
| Stability | experimental |
| Portability | portable |
| Safe Haskell | None |
| Language | Haskell98 |
ALife.Creatur.Logger.SimpleRotatingLogger
Description
A simple rotating log, tailored to the needs of the Créatúr framework.
- class Logger l where
- data SimpleRotatingLogger
- mkSimpleRotatingLogger :: FilePath -> String -> Int -> SimpleRotatingLogger
Documentation
Minimal complete definition
Methods
writeToLog :: String -> StateT l IO () Source #
formats and writes a new log message.writeToLog msg
Instances
data SimpleRotatingLogger Source #
A rotating logger.
mkSimpleRotatingLogger :: FilePath -> String -> Int -> SimpleRotatingLogger Source #
creates a logger that will write to
directory mkSimpleRotatingLogger d prefix nd. The log "rotates" (starts a new log file) every n
records. Log files follow the naming convention prefix.k, where k
is the number of the last log record contained in the file. If logging
has already been set up in directory, then logging will continue where
it left off; appending to the most recent log file.