Module optivo.common.log4lua.appenders.file

File appender.

Log rotation

Optionally the appender can be created with a date pattern to enable log file rotation. If you want to enable this feature you have to put the placeholder "%s" into your file name. As an example this creates a daily rotating file:
local fileAppender = require("optivo.common.log4lua.appenders.file")
fileAppender.create("myFile-%s.log", "%Y-%m-%d")

Release: $Date: 2008-09-06 03:57:01 +0200 (Sa, 06 Sep 2008) $ $Rev: 68 $

Functions

new (fileName, datePattern, pattern) An appender that logs to a file.


Functions

new (fileName, datePattern, pattern)
An appender that logs to a file.

Parameters

  • fileName: path to the log file. It must be writeable otherwise the appender will be disabled.
  • datePattern: (optional) the pattern to be used to format (os.date) a date which is then substituted in the file name.
  • pattern: (optional) the message pattern.

Valid XHTML 1.0!