Ticket #638: log.py.patch
| File log.py.patch, 0.9 KB (added by harshaw, 7 years ago) |
|---|
-
log.py
20 20 except NameError: 21 21 UnicodeEncodeError = UnicodeError 22 22 23 #for ILogObserver 24 from zope.interface import Interface 23 25 24 26 class ILogContext: 25 27 """Actually, this interface is just a synoym for the dictionary interface, … … 237 239 msg = theLogPublisher.msg 238 240 239 241 242 class ILogObserver(Interface): 243 244 def setFile(self,f): 245 """ set the file like object used for writing """ 246 247 def emit(self, eventDict): 248 """ 249 emit a log message. 250 """ 251 252 def start(self): 253 """Start observing log events.""" 254 255 def stop(self): 256 """Stop observing log events.""" 257 258 def __repr__(self): 259 """ print out what this log observer is all about """ 260 240 261 class FileLogObserver: 241 262 """Log observer that writes to a file-like object. 242 263
