diff options
Diffstat (limited to 'app/acf_www-controller.lua')
-rw-r--r-- | app/acf_www-controller.lua | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/app/acf_www-controller.lua b/app/acf_www-controller.lua index 03ad5da..1d5966e 100644 --- a/app/acf_www-controller.lua +++ b/app/acf_www-controller.lua @@ -17,7 +17,9 @@ local parent_exception_handler mvc = {} mvc.on_load = function (self, parent) - + -- open the log file + self.conf.logfile = io.open ("/var/log/acf.log", "a+") + -- Make sure we have some kind of sane defaults for libdir and sessiondir self.conf.libdir = self.conf.libdir or ( self.conf.appdir .. "/lib/" ) self.conf.sessiondir = self.conf.sessiondir or "/tmp/" @@ -71,6 +73,8 @@ mvc.post_exec = function (self) sessionlib.save_session(conf.sessiondir, sessiondata.id, sessiondata) end + -- Close the logfile + conf.logfile:close() end @@ -228,3 +232,9 @@ cfe = function ( optiontable ) return me end +-- FIXME - need to think more about this.. +logevent = function ( message ) + conf.logfile:write (string.format("%s: %s\n", os.date(), message)) +end + + |