creatur-5.9.6: Framework for artificial life experiments.

Copyright(c) Amy de Buitléir 2011-2015
LicenseBSD-style
Maintaineramy@nualeargais.ie
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell98

ALife.Creatur.Logger.SimpleRotatingLogger

Description

A simple rotating log, tailored to the needs of the Créatúr framework.

Synopsis

Documentation

class Logger l where Source

Methods

writeToLog :: String -> StateT l IO () Source

writeToLog msg formats and writes a new log message.

mkSimpleRotatingLogger :: FilePath -> String -> Int -> SimpleRotatingLogger Source

mkSimpleRotatingLogger d prefix n creates a logger that will write to directory d. 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.