code: def print_message(self, message="heya!"):
          
          if self.log == None: print(message)
          else:                self.log.append_text(message)
docs: If self.log is defined to be an instance of TextLog, it print the
          message there. Otherwise use the usual "print" to command line.