def log_request(self, handler):
packet = {'<STR_LIT>': handler.request.method,<EOL>'<STR_LIT>': handler.request.uri,<EOL>'<STR_LIT>': handler.request.remote_ip,<EOL>'<STR_LIT:status>': handler.get_status(),<EOL>'<STR_LIT>': handler.request.request_time() * <NUM_LIT>,<EOL>'<STR_LIT>': self.service_id,<EOL>'<STR_LIT>': handler.request.headers.get(REQUEST_ID_HEADER,<EOL>'<STR_LIT>')<EOL>}<EOL>if hasattr(handler, '<STR_LIT>'):<EOL><INDENT>for key, value in handler.logvalues.iteritems():<EOL><INDENT>packet[key] = value<EOL><DEDENT><DEDENT>servicelog.log(packet)<EOL>metric = "<STR_LIT>" + str(handler.get_status())<EOL>metrics.timing(metric, handler.request.request_time() * <NUM_LIT>)<EOL>super(LoggingApplication, self).log_request(handler)<EOL>
Override base method to log requests to JSON UDP collector and emit
a metric.