def emit(self, record): if not getattr(record, 'request', None): return record.request_path = record.request.path UnicodeHandler.emit(self, record) self.emitted(self.__class__.__name__.lower())
def emit(self, record): if self.should_email(record) or not getattr(record, 'request', None): return # Make the path available. record.request_path = record.request.path UnicodeHandler.emit(self, record) self.emitted(self.__class__.__name__.lower())
def emit(self, record): if not getattr(record, 'request', None): record.request_path = '' else: record.request_path = record.request.path UnicodeHandler.emit(self, record) self.emitted(self.__class__.__name__.lower())