def write(self, target, message):
        self.counter+=1
        
        if target=='':
            target='app'
        try:
            target_idx=self.targets.index(target)
        except __HOLE__:
            target_idx = -1
        
        # add new target
        if target_idx<0:
            target_idx=self.addTarget(target)
        
        target_row=target_idx+1     
        old_text=self.getHTML(target_row, 1)
        log_line="%d: " % self.counter + message

        if old_text=='&nbsp;':
            new_text=log_line            
        else:
            new_text=old_text + "<br>" + log_line
        self.setHTML(target_row, 1, new_text)
dataset/ETHPy150Open anandology/pyjamas/examples/mail/Logger.py/LoggerCls.write