code: def log_event(self, message, timestamp=None):
          
  
          if not message: # if empty or None
              logger.debug("ASCWriter: ignoring empty message")
              return
  
          # this is the case for the very first message:
          if not self.header_written:
              self.last_timestamp = (timestamp or 0.0)
              self.started = self.last_timestamp
              mlsec = repr(self.last_timestamp).split('.')[1][:3]
              formatted_date = time.strftime(self.FORMAT_DATE.format(mlsec), time.localtime(self.last_timestamp))
              self.file.write("Begin Triggerblock %s\n" % formatted_date)
              self.header_written = True
              self.log_event("Start of measurement") # caution: this is a recursive call!
  
          # Use last known timestamp if unknown
          if timestamp is None:
              timestamp = self.last_timestamp
  
          # turn into relative timestamps if necessary
          if timestamp >= self.started:
              timestamp -= self.started
  
          line = self.FORMAT_EVENT.format(timestamp=timestamp, message=message)
          self.file.write(line)
docs: Add a message to the log file.
  
          :param str message: an arbitrary message
          :param float timestamp: the absolute timestamp of the event