Hi, today I had to deal with an access error and wanted to write a little cron job which informs me via mail that something was wrong at my Zope site. I do so for apache and did not expect any problem her but this seemed naive ... The only documentation I was able to find about writing error logs in Zope was http://www.zope.org/Documentation/Misc/LOGGING.txt but there is no date or version info in this text and because it is refering to a Python 1.5.2 version I doubt that this information might be outdated. Anyway - I do not understand this: Creating your own Zope logger is easy. Simply define a logger class with the following interface: ... I really can't imagine that I'm the only one who wants /var/log/zope/error.log without any intervention and so I hope there is a way which is "even more easy" than described above. ;-) Kind regards Andreas.
Andreas Tille wrote:
Hi,
today I had to deal with an access error and wanted to write a little cron job which informs me via mail that something was wrong at my Zope site. I do so for apache and did not expect any problem her but this seemed naive ...
Have a look at this: http://www.zope.org/Members/NIP/MailingLogger/ Chris
On Fri, 26 Sep 2003, Chris Withers wrote:
Have a look at this: http://www.zope.org/Members/NIP/MailingLogger/ If I install this product and set the according variables to
export MAILING_LOGGER_ADDRESS=tillea@rki.de export MAILING_LOGGER_SMTPSERVER=localhost (localhost is a valid host for SMTP which I'm using for instance in MailHost objects) Zope can not render any page at all. Instead it reports that something went so wrong that not even error_log can be written. I try to continus with doc/LOGGING.txt ... Kind regards Andreas.
Andreas Tille wrote at 2003-9-26 09:13 +0200:
today I had to deal with an access error and wanted to write a little cron job which informs me via mail that something was wrong at my Zope site. I do so for apache and did not expect any problem her but this seemed naive ...
The only documentation I was able to find about writing error logs in Zope was
The document "LOGGING.txt" in the directory "doc" of your Zope distribution may be a better resource ("Debian" may have put the "doc" directory somewhere else).
... Creating your own Zope logger is easy. Simply define a logger class with the following interface: ...
You find this, too, in "doc/LOGGING.txt". However, read the easy part and skip the difficult one ;-) Dieter
On Fri, 26 Sep 2003, Dieter Maurer wrote:
You find this, too, in "doc/LOGGING.txt". However, read the easy part and skip the difficult one ;-) If I read the easy part right a
export EVENT_LOG_FILE=/var/log/zope/error.log should help. # Zope's event logger is controlled by the "EVENT_LOG_FILE" environment # variable. If you don't have a "EVENT_LOG_FILE" environment variable # (or its older alias "STUPID_LOG_FILE") set, Zope will log to the standard # output. For more information on EVENT_LOG_FILE, see doc/ENVIRONMENT.txt. Funny enough I use STUPID_LOG_FILE for a long time but did not regarded this as an error.log file as I know it from apache. Is there any chance to reduce the verbosity just to one line per entry for more easy parsing (well, I'm comfortable with grep but it's pure a waste of diskspace). I've found, that it should be able to customize the log via EVENT_LOG_FORMAT variable but I did not found any information *how* this can be done. It smells like my friend here. Kind regards Andreas.
Andreas Tille wrote at 2003-10-1 16:00 +0200:
... Logging ... Funny enough I use STUPID_LOG_FILE for a long time but did not regarded this as an error.log file as I know it from apache. Is there any chance to reduce the verbosity just to one line per entry for more easy parsing (well, I'm comfortable with grep but it's pure a waste of diskspace).
The code is in "ZLogger/stupidFileLogger.py"
I've found, that it should be able to customize the log via
EVENT_LOG_FORMAT
variable but I did not found any information *how* this can be done. It smells like my friend here.
Look at the source... "EVENT_LOG_FORMAT" alone will not allow you to always get one line. You will have to suppress tracebacks (and this requires code modification). However, tracebacks are valuable and no waste of (cheap) diskspace ... Think again! Dieter
participants (3)
-
Andreas Tille -
Chris Withers -
Dieter Maurer