def onMessage(self, target, message):
        self.counter+=1
        
        if target=='':
            target='app'
        target_idx=self.targets.index(target)
        
        # 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=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/kitchensink/Logger.py/Logger.onMessage/original