<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _send(self):
 """ Convert message to a json object and send to Lognetries """

        while len(self.queue) > 0:
            metric = self.queue.popleft()
            topic, value, timestamp = str(metric).split()
            msg = json.dumps({"event": {topic: value}})
            req = urllib2.Request("https://js.logentries.com/v1/logs/" +
                                  self.log_token, msg)
            try:
                urllib2.urlopen(req)
            except urllib2.URLError as e:
                logging.error("Can't send log message to Logentries %s", e)