Get the specified event log.
513151
def get_event_log(self, object_id):
		""""""
		content = self._fetch("/event_log/%s" % object_id, method="GET")
		return FastlyEventLog(self, content)
1224475
def get_log(request):
    
    query = d1_gmn.app.models.EventLog.objects.all().order_by('timestamp', 'id')
    if not d1_gmn.app.auth.is_trusted_subject(request):
        query = d1_gmn.app.db_filter.add_access_policy_filter(
            request, query, 'sciobj__id'
        )
        query = d1_gmn.app.db_filter.add_redact_annotation(request, query)
    query = d1_gmn.app.db_filter.add_datetime_filter(
        request, query, 'timestamp', 'fromDate', 'gte'
    )
    query = d1_gmn.app.db_filter.add_datetime_filter(
        request, query, 'timestamp', 'toDate', 'lt'
    )
    query = d1_gmn.app.db_filter.add_string_filter(
        request, query, 'event__event', 'event'
    )
    if d1_gmn.app.views.util.is_v1_api(request):
        query = d1_gmn.app.db_filter.add_string_begins_with_filter(
            request, query, 'sciobj__pid__did', 'pidFilter'
        )
    elif d1_gmn.app.views.util.is_v2_api(request):
        query = d1_gmn.app.db_filter.add_sid_or_string_begins_with_filter(
            request, query, 'sciobj__pid__did', 'idFilter'
        )
    else:
        assert False, 'Unable to determine API version'
    total_int = query.count()
    query, start, count = d1_gmn.app.views.slice.add_slice_filter(
        request, query, total_int
    )
    return {
        'query': query,
        'start': start,
        'count': count,
        'total': total_int,
        'type': 'log',
    }
6632
async def pop_log(self):
        """"""
        self._check_receive_loop()
        res = self.log_queue.get()
        self._check_error(res)
        return res
1215731
def log_event(event, logger=root_logger, **log_dict):
    
    msg = "event={}".format(event)
    msg = add_items_to_message(msg, log_dict)
    log_dict.update({'event': event})
    logger.info(msg, extra=log_dict)
435726
def get_event(self, event_key):
    

    event = self.event_key_map.get(event_key)

    if event:
      return event

    self.logger.error('Event "%s" is not in datafile.' % event_key)
    self.error_handler.handle_error(exceptions.InvalidEventException(enums.Errors.INVALID_EVENT_KEY_ERROR))
    return None
503744
def process_log_event(event, context):
    
    init()
    # Grab the actual error log payload
    serialized = event['awslogs'].pop('data')
    data = json.loads(zlib.decompress(
        base64.b64decode(serialized), 16 + zlib.MAX_WBITS))
    msg = get_sentry_message(config, data)
    if msg is None:
        return
    if config['sentry_dsn']:
        # Deliver directly to sentry
        send_sentry_message(config['sentry_dsn'], msg)
    elif config['sentry_sqs']:
        # Delivery indirectly via sqs
        sqs.send_message(
            QueueUrl=config['sentry_sqs'])
612558
void onEvent(EventLog log, EventType eventType)
    {

        switch (eventType)
        {
        case INSERT:

            onInsert(log);
            break;

        case UPDATE:
            onUpdate(log);
            break;

        case DELETE:
            onDelete(log);
            break;

        default:

            throw new KunderaException("Invalid event type:" + eventType);
        }

    }
833597
def get_event_data(event_abi, log_entry):
    
    if event_abi['anonymous']:
        log_topics = log_entry['topics']
    elif not log_entry['topics']:
        raise MismatchedABI("Expected non-anonymous event to have 1 or more topics")
    elif event_abi_to_log_topic(event_abi) != log_entry['topics'][0]:
        raise MismatchedABI("The event signature did not match the provided ABI")
    else:
        log_topics = log_entry['topics'][1:]

    log_topics_abi = get_indexed_event_inputs(event_abi)
    log_topic_normalized_inputs = normalize_event_input_types(log_topics_abi)
    log_topic_types = get_event_abi_types_for_decoding(log_topic_normalized_inputs)
    log_topic_names = get_abi_input_names({'inputs': log_topics_abi})

    if len(log_topics) != len(log_topic_types):
        raise ValueError("Expected {0} log topics.  Got {1}".format(
            len(log_topic_types),
            len(log_topics),
        ))

    log_data = hexstr_if_str(to_bytes, log_entry['data'])
    log_data_abi = exclude_indexed_event_inputs(event_abi)
    log_data_normalized_inputs = normalize_event_input_types(log_data_abi)
    log_data_types = get_event_abi_types_for_decoding(log_data_normalized_inputs)
    log_data_names = get_abi_input_names({'inputs': log_data_abi})

    # sanity check that there are not name intersections between the topic
    # names and the data argument names.
    duplicate_names = set(log_topic_names).intersection(log_data_names)
    if duplicate_names:
        raise ValueError(
            "Invalid Event ABI:  The following argument names are duplicated "
            "between event inputs: '{0}'".format(', '.join(duplicate_names))
        )

    decoded_log_data = decode_abi(log_data_types, log_data)
    normalized_log_data = map_abi_data(
        BASE_RETURN_NORMALIZERS,
        log_data_types,
        decoded_log_data
    )

    decoded_topic_data = [
        decode_single(topic_type, topic_data)
        for topic_type, topic_data
        in zip(log_topic_types, log_topics)
    ]
    normalized_topic_data = map_abi_data(
        BASE_RETURN_NORMALIZERS,
        log_topic_types,
        decoded_topic_data
    )

    event_args = dict(itertools.chain(
        zip(log_topic_names, normalized_topic_data),
        zip(log_data_names, normalized_log_data),
    ))

    event_data = {
        'args': event_args,
        'event': event_abi['name'],
        'logIndex': log_entry['logIndex'],
        'transactionIndex': log_entry['transactionIndex'],
        'transactionHash': log_entry['transactionHash'],
        'address': log_entry['address'],
        'blockHash': log_entry['blockHash'],
        'blockNumber': log_entry['blockNumber'],
    }

    return AttributeDict.recursive(event_data)
477963
def logs(self):
        """"""
        url = self._url + "/logs"
        return _log(url=url,
                    securityHandler=self._securityHandler,
                    proxy_url=self._proxy_url,
                    proxy_port=self._proxy_port)
614670
async def access_log_middleware(app, handler):
    """"""

    event_log = app.get('smartmob.event_log') or structlog.get_logger()
    clock = app.get('smartmob.clock') or timeit.default_timer

    # Keep the request arrival time to ensure we get intuitive logging of
    # events.
    arrival_time = datetime.utcnow().replace(tzinfo=timezone.utc)

    async def access_log(request):
        ref = clock()
        try:
            response = await handler(request)
            event_log.info(
                'http.access',
                path=request.path,
                outcome=response.status,
                duration=(clock()-ref),
                request=request.get('x-request-id', '?'),
                **{'@timestamp': arrival_time}
            )
            return response
        except web.HTTPException as error:
            event_log.info(
                'http.access',
                path=request.path,
                outcome=error.status,
                duration=(clock()-ref),
                request=request.get('x-request-id', '?'),
                **{'@timestamp': arrival_time}
            )
            raise
        except Exception:
            event_log.info(
                'http.access',
                path=request.path,
                outcome=500,
                duration=(clock()-ref),
                request=request.get('x-request-id', '?'),
                **{'@timestamp': arrival_time}
            )
            raise

    return access_log
432427
protected EventLoggerEventHandler getEventHandler(ActivitiEvent event) {

		Class<? extends EventLoggerEventHandler> eventHandlerClass = null;
		if (event.getType().equals(ActivitiEventType.ENTITY_INITIALIZED)) {
			Object entity = ((ActivitiEntityEvent) event).getEntity();
			if (entity instanceof ExecutionEntity) {
				ExecutionEntity executionEntity = (ExecutionEntity) entity;
				if (executionEntity.getProcessInstanceId().equals(executionEntity.getId())) {
					eventHandlerClass = ProcessInstanceStartedEventHandler.class;
				}
			}
		} else if (event.getType().equals(ActivitiEventType.ENTITY_DELETED)) {
			Object entity = ((ActivitiEntityEvent) event).getEntity();
			if (entity instanceof ExecutionEntity) {
				ExecutionEntity executionEntity = (ExecutionEntity) entity;
				if (executionEntity.getProcessInstanceId().equals(executionEntity.getId())) {
					eventHandlerClass = ProcessInstanceEndedEventHandler.class;
				}
			}
		} else {
			// Default: dedicated mapper for the type
			eventHandlerClass = eventHandlers.get(event.getType());
		}
		
		if (eventHandlerClass != null) {
			return instantiateEventHandler(event, eventHandlerClass);
		}
		
		return null;
	}
783473
function(loggingEvent) {
		var useragent = "unknown";
		try {
			useragent = navigator.userAgent;
		} catch(e){
			useragent = "unknown";
		}
		
		var referer = "unknown";
		try {
			referer = location.href;
		} catch(e){
			referer = "unknown";
		}
				
		var content = "<log4js:event logger=\"";
		content += loggingEvent.categoryName + "\" level=\"";
		content += loggingEvent.level.toString() + "\" useragent=\"";
		content += useragent + "\" referer=\"";
		content += referer.replace(/&/g, "&amp;") + "\" timestamp=\"";
		content += loggingEvent.getFormattedTimestamp() + "\">\n";
		content += "\t<log4js:message><![CDATA[" + this.escapeCdata(loggingEvent.message) + "]]></log4js:message>\n";	
 		
 		if (loggingEvent.exception) {
			content += this.formatException(loggingEvent.exception) ;
		}
 		content += "</log4js:event>\n";
        
      return content;
	}
1060240
def get_logger(name=None, level=logging.DEBUG, stream=None):
    """"""
    logger = logging.getLogger(name)
    colored = colorize_logger(logger, stream=stream, level=level)
    return colored
68439
def get_stats(self, request, context):
        """"""
        _log_request(request, context)
        m = self.listener.memory
        return clearly_pb2.StatsMessage(
            task_count=m.task_count,
            event_count=m.event_count,
            len_tasks=len(m.tasks),
            len_workers=len(m.workers)
        )
482510
private LoggingEvent buildEvent() {
    if (currentMap.size() == 0) {
      if (additionalLines.size() > 0) {
        for (Iterator iter = additionalLines.iterator();iter.hasNext();) {
          getLogger().info("found non-matching line: " + iter.next());
        }
      }
      additionalLines.clear();
      return null;
    }
    //the current map contains fields - build an event
    int exceptionLine = getExceptionLine();
    String[] exception = buildException(exceptionLine);

    //messages are listed before exceptions in additionallines
    if (additionalLines.size() > 0 && exception.length > 0) {
      currentMap.put(MESSAGE, buildMessage((String) currentMap.get(MESSAGE),
          exceptionLine));
    }
    LoggingEvent event = convertToEvent(currentMap, exception);
    currentMap.clear();
    additionalLines.clear();
    return event;
  }
224364
public synchronized XEvent get(int eventIndex) throws IOException,
			IndexOutOfBoundsException {
		// check for index sanity
		if (eventIndex < 0 || eventIndex >= size) {
			throw new IndexOutOfBoundsException();
		}
		// determine and set appropriate file pointer position
		navigateToIndex(eventIndex);
		// read and return requested audit trail entry
		return read();
	}
610022
def Get(self):
    """"""
    try:
      with io.open(self.logfile, "rb") as fd:
        data = fd.read(self.max_log_size)
    except (IOError, OSError):
      return

    try:
      if data:
        return rdf_flows.GrrMessage.FromSerializedString(data)
    except (message.Error, rdfvalue.Error):
      return