def emit(self, record):
        try:
            msg = self.format(record)
            fs = "%s\n"
            if not hasattr(types, "UnicodeType"): #if no unicode support...
                self.stream.write(fs % msg)
            else:
                try:
                    self.stream.write(fs % msg)
                except UnicodeError:
                    self.stream.write(fs % msg.encode("UTF-8"))
            self.flush()
        except (KeyboardInterrupt, SystemExit):
            raise
        except:
            self.handleError(record)
Refresh the tree starting from the specified element.
dataset/ETHPy150Open babble/babble/include/jython/Lib/logging/__init__.py/StreamHandler.emit--crossover with--dataset/ETHPy150Open enthought/pyface/pyface/viewer/tree_viewer.py/TreeViewer.refresh