Hi.
I'm continuing to improve my small nagios plugin for Zope. I started to
include error messages in the sensor. Therefore I was missing a way to
get error messages out of the error log to signal nagios that everything
is fine. I have a working patch attached (it references an image that is
ready to be added as well).
Due to the fact that this is a feature and the code provides no unit
test infrastructure (and I don't have the time to start doing that for
the error log) I'd like to know what the general rule for Zope 2 is, If
I want to make improvements to existing code that isn't covered by unit
tests at all.
I'd check this in to the svn trunk if you like.
Cheers,
Christian
--
Christian Theune [EMAIL PROTECTED]
gocept gmbh co. kg
? forgetEntries.patch
? www/ok.gif
Index: SiteErrorLog.py
===
RCS file: /cvs-repository/Products/SiteErrorLog/Attic/SiteErrorLog.py,v
retrieving revision 1.15.12.2
diff -r1.15.12.2 SiteErrorLog.py
122a123,137
security.declareProtected(use_error_logging, 'forgetEntry')
def forgetEntry(self, id):
Removes an entry from the error log.
log = self._getLog()
cleanup_lock.acquire()
i=0
for entry in log:
if entry['id'] == id:
del log[i]
i += 1
cleanup_lock.release()
return Globals.MessageDialog(title='Entry removed',
message='Error log entry was removed.',
action='./manage_main',)
Index: __init__.py
===
RCS file: /cvs-repository/Products/SiteErrorLog/Attic/__init__.py,v
retrieving revision 1.3
diff -r1.3 __init__.py
19a20,24
from ImageFile import ImageFile
misc_={
'ok.gif': ImageFile('www/ok.gif', globals()),
}
Index: www/main.pt
===
RCS file: /cvs-repository/Products/SiteErrorLog/www/Attic/main.pt,v
retrieving revision 1.4
diff -r1.4 main.pt
71a72
th/th
90a92
tda href=# tal:attributes=href string:${here/absolute_url}/forgetEntry?id=${entry/id}img title=Forget this entry src=/misc_/SiteErrorLog/ok.gif border=0/a/td
attachment: ok.gif
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil
___
Zope-Dev maillist - [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )