Copyright | (c) Amy de Buitléir 2011-2014 |
---|---|
License | BSD-style |
Maintainer | amy@nualeargais.ie |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell98 |
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
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 -> 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.