code: def format(self, record):
          
  
          try:
              n = record.n
          except AttributeError:
              n = 'default'
  
          try:
              message = record.message
          except AttributeError:
              message = record.msg
  
          senml = OrderedDict(
              uid="hyperstream",
              bt=datetime.utcfromtimestamp(record.created).isoformat()[:-3] + 'Z',
              e=[OrderedDict(n=n, v=message)]
          )
  
          formatted_json = json.dumps(senml)
          return formatted_json
docs: The formatting function
  
          :param record: The record object
          :return: The string representation of the record