EventEvaluator<ILoggingEvent> ee = evaluatorList.get(i); try { if (ee.evaluate(le)) { printCallerData = true; break;
EventEvaluator<ILoggingEvent> ee = evaluatorList.get(i); try { if (ee.evaluate(event)) { printStack = false; break;
EventEvaluator<ILoggingEvent> ee = evaluatorList.get(i); try { if (ee.evaluate(le)) { printCallerData = true; break;
public FilterReply decide(E event) { // let us not throw an exception // see also bug #17. if (!isStarted() || !evaluator.isStarted()) { return FilterReply.NEUTRAL; } try { if (evaluator.evaluate(event)) { return onMatch; } else { return onMismatch; } } catch (EvaluationException e) { addError("Evaluator " + evaluator.getName() + " threw an exception", e); return FilterReply.NEUTRAL; } }
EventEvaluator<ILoggingEvent> ee = evaluatorList.get(i); try { if (ee.evaluate(event)) { printStack = false; break;
if (eventEvaluator.evaluate(eventObject)) {
@Override public boolean evaluate(ILoggingEvent event) throws EvaluationException { if (nested.evaluate(event)) { Object key = eventKey(event); Integer n = cache.getIfPresent(key); if (n == null) { n = 0; } cache.put(key, n+1); return n == 0; } else { return false; } }
/** * Return true if any evaluator returns true, indicating that * the stack trace should not be logged. */ private boolean isExcludedByEvaluator(ILoggingEvent event) { for (int i = 0; i < evaluators.size(); i++) { EventEvaluator<ILoggingEvent> evaluator = evaluators.get(i); try { if (evaluator.evaluate(event)) { return true; } } catch (EvaluationException eex) { int errors = errorCount.incrementAndGet(); if (errors < CoreConstants.MAX_ERROR_COUNT) { addError(String.format("Exception thrown for evaluator named [%s]", evaluator.getName()), eex); } else if (errors == CoreConstants.MAX_ERROR_COUNT) { ErrorStatus errorStatus = new ErrorStatus( String.format("Exception thrown for evaluator named [%s]", evaluator.getName()), this, eex); errorStatus.add(new ErrorStatus( "This was the last warning about this evaluator's errors." + "We don't want the StatusManager to get flooded.", this)); addStatus(errorStatus); } } } return false; }
public FilterReply decide(E event) { // let us not throw an exception // see also bug #17. if (!isStarted() || !evaluator.isStarted()) { return FilterReply.NEUTRAL; } try { if (evaluator.evaluate(event)) { return onMatch; } else { return onMismatch; } } catch (EvaluationException e) { addError("Evaluator " + evaluator.getName() + " threw an exception", e); return FilterReply.NEUTRAL; } }
public FilterReply decide(E event) { // let us not throw an exception // see also bug #17. if (!isStarted() || !evaluator.isStarted()) { return FilterReply.NEUTRAL; } try { if (evaluator.evaluate(event)) { return onMatch; } else { return onMismatch; } } catch (EvaluationException e) { addError("Evaluator " + evaluator.getName() + " threw an exception", e); return FilterReply.NEUTRAL; } }
public FilterReply decide(E event) { // let us not throw an exception // see also bug #17. if (!isStarted() || !evaluator.isStarted()) { return FilterReply.NEUTRAL; } try { if (evaluator.evaluate(event)) { return onMatch; } else { return onMismatch; } } catch (EvaluationException e) { addError("Evaluator " + evaluator.getName() + " threw an exception", e); return FilterReply.NEUTRAL; } }
public FilterReply decide(E event) { // let us not throw an exception // see also bug #17. if (!isStarted() || !evaluator.isStarted()) { return FilterReply.NEUTRAL; } try { if (evaluator.evaluate(event)) { return onMatch; } else { return onMismatch; } } catch (EvaluationException e) { addError("Evaluator " + evaluator.getName() + " threw an exception", e); return FilterReply.NEUTRAL; } }
public FilterReply decide(E event) { // let us not throw an exception // see also bug #17. if (!isStarted() || !evaluator.isStarted()) { return FilterReply.NEUTRAL; } try { if (evaluator.evaluate(event)) { return onMatch; } else { return onMismatch; } } catch (EvaluationException e) { addError("Evaluator " + evaluator.getName() + " threw an exception", e); return FilterReply.NEUTRAL; } }
/** * Perform SMTPAppender specific appending actions, delegating some of them to * a subclass and checking if the event triggers an e-mail to be sent. */ protected void append(E eventObject) { if (!checkEntryConditions()) { return; } subAppend(eventObject); try { if (eventEvaluator.evaluate(eventObject)) { sendBuffer(eventObject); } } catch (EvaluationException ex) { addError("SMTPAppender's EventEvaluator threw an Exception" + ex); } }
public FilterReply decide(E event) { // let us not throw an exception // see also bug #17. if (!isStarted() || !evaluator.isStarted()) { return FilterReply.NEUTRAL; } try { if (evaluator.evaluate(event)) { return onMatch; } else { return onMismatch; } } catch (EvaluationException e) { addError("Evaluator " + evaluator.getName() + " threw an exception", e); return FilterReply.NEUTRAL; } }
public FilterReply decide(E event) { // let us not throw an exception // see also bug #17. if (!isStarted() || !evaluator.isStarted()) { return FilterReply.NEUTRAL; } try { if (evaluator.evaluate(event)) { return onMatch; } else { return onMismatch; } } catch (EvaluationException e) { addError("Evaluator " + evaluator.getName() + " threw an exception", e); return FilterReply.NEUTRAL; } }
public FilterReply decide(E event) { // let us not throw an exception // see also bug #17. if (!isStarted() || !evaluator.isStarted()) { return FilterReply.NEUTRAL; } try { if (evaluator.evaluate(event)) { return onMatch; } else { return onMismatch; } } catch (EvaluationException e) { addError("Evaluator " + evaluator.getName() + " threw an exception", e); return FilterReply.NEUTRAL; } }
private boolean evaluate(final String name, final ILoggingEvent event) { final EventEvaluator<ILoggingEvent> evaluator = evaluators.get(name); try { return null != evaluator && evaluator.evaluate(event); } catch (final EvaluationException e) { errors++; if (MAX_ERROR_COUNT > errors) { addError("Exception thrown for evaluator named [" + evaluator.getName() + "]", e); } else if (MAX_ERROR_COUNT == errors) { final ErrorStatus errorStatus = new ErrorStatus( "Exception thrown for evaluator named [" + evaluator.getName() + "].", this, e); errorStatus.add(new ErrorStatus( "This was the last warning about this evaluator's errors." + "We don't want the StatusManager to get flooded.", this)); addStatus(errorStatus); } return false; } }
EventEvaluator<ILoggingEvent> ee = evaluatorList.get(i); try { if (ee.evaluate(event)) { printStack = false; break;
EventEvaluator<ILoggingEvent> ee = evaluatorList.get(i); try { if (ee.evaluate(event)) { printStack = false; break;