| Portability | portable |
|---|---|
| Stability | experimental |
| Maintainer | amy@nualeargais.ie |
| Safe Haskell | None |
ALife.Creatur.Logger
Description
A simple rotating log, tailored to the needs of the Créatúr framework.
- class Logger l where
- writeToLog :: String -> StateT l IO ()
- data SimpleRotatingLogger
- mkSimpleRotatingLogger :: FilePath -> String -> Int -> SimpleRotatingLogger
Documentation
Methods
writeToLog :: String -> StateT l IO ()Source
formats and writes a new log message.
writeToLog msg
data SimpleRotatingLogger Source
A rotating logger.
mkSimpleRotatingLogger :: FilePath -> String -> Int -> SimpleRotatingLoggerSource
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.