creatur-5.3.1: Framework for artificial life experiments.

Portabilityportable
Stabilityexperimental
Maintaineramy@nualeargais.ie
Safe HaskellNone

ALife.Creatur.Logger

Description

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

Synopsis

Documentation

class Logger l whereSource

Methods

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

writeToLog msg formats and writes a new log message.

mkSimpleRotatingLogger :: FilePath -> String -> Int -> SimpleRotatingLoggerSource

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.