survey-devel-list: error logging
bugant <[email protected]> Wed, 14 Sep 2005 15:38:13 +0200
| Newsgroups | gmane.comp.apache.mod-survey.devel,gmane.comp.apache.mod-survey.general |
|---|---|
| Message-ID | <[email protected]> |
hi all,
sorry for the cross posting on both survey-discussion and
survey-devel lists, I hope this won't be a big problem.
I worked on a new future during the last days.
I've implemented a solution that permit to handle errors without (I
hope) scarring users ;)
As you know, when an error occurred (e.g a syntax error or an error
related to db connection or... so on) a scarry red message was displayed
to the user that can do nothing to resolve it.
I change this and now the user recieve a quiter message that inform
him/her that an error occurs.
On the other side the survey's creator can choose to receive an e-mail
whenever an error occurs but anyway errors are always logged to a file
specified in survey.conf.
On survey developing time you can set SHOWERRORS SURVEY property to yes
to view all error messages as before.
I tested this changes a bit but more test is needed. I find very
comfortable with these new features.
Summarizing:
- there's a new SURVEY property called SHOWERRORS that's default
setted to no; you must turn it on (setting it to yes) to be
able to see error messages on your web browser as they appeared
before my changes.
- there's another new SURVEY property called (by now... new name can
be choosen) MAIL_ADMIN which is the mail address to send error email
to.
- there's two new env that can be setted in survey.conf:
_SURVEY_ALERT_MAIL that must be setted if you want to receive email
on error. (email will be sent to MAIL_ADMIN SURVEY's property or to
_SURVEY_MAIL_ADMIN otherwise).
_SURVEY_LOG_FILE which is the path to the log file.
I don't change the installer to take care about the new survey.conf
settings so by now you've to adjust it by your-self.
Technically speaking I've defined an ErrorHandling sub on each .pm file
on Survey dir (only that level not in sub-level such as Component). This
is not soo good. I'll think about it trying to find a nicer solution.
Anyone interest in testing this feature can use the code in mod_survey
devel cvs tree:
:pserver:[email protected]:2401/devel
Stay tuned,
bugant.
Skickat av bugant <[email protected]>
till survey-devel