@SuppressWarnings("unchecked") public void start() { String depthStr = getFirstOption(); if (depthStr == null) { return; if (isRange(depthStr)) { String[] numbers = splitRange(depthStr); if (numbers.length == 2) { depthStart = Integer.parseInt(numbers[0]); depthEnd = Integer.parseInt(numbers[1]); checkRange(); } else { addError("Failed to parse depth option as range [" + depthStr + "]"); addError("Failed to parse depth option [" + depthStr + "]", nfe); final List<String> optionList = getOptionList(); for (int i = 1; i < optionListSize; i++) { String evaluatorStr = optionList.get(i); Context context = getContext(); if (context != null) { Map<String, EventEvaluator<?>> evaluatorMap = (Map<String, EventEvaluator<?>>) context.getObject(CoreConstants.EVALUATOR_MAP); EventEvaluator<ILoggingEvent> ee = (EventEvaluator<ILoggingEvent>) evaluatorMap.get(evaluatorStr); if (ee != null) { addEvaluator(ee);
errorCount++; if (errorCount < MAX_ERROR_COUNT) { addError("Exception thrown for evaluator named [" + ee.getName() + "]", eex); } else if (errorCount == MAX_ERROR_COUNT) { ErrorStatus errorStatus = new ErrorStatus("Exception thrown for evaluator named [" + ee.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); buf.append(getCallerLinePrefix()); buf.append(i); buf.append("\t at ");
private boolean isRange(String depthStr) { return depthStr.contains(getDefaultRangeDelimiter()); }
@SuppressWarnings("unchecked") public void start() { String depthStr = getFirstOption(); if (depthStr == null) { return; } try { depth = Integer.parseInt(depthStr); } catch (NumberFormatException nfe) { addError("Failed to parse depth option [" + depthStr + "]", nfe); } final List optionList = getOptionList(); if (optionList != null && optionList.size() > 1) { final int optionListSize = optionList.size(); for (int i = 1; i < optionListSize; i++) { String evaluatorStr = (String) optionList.get(i); Context context = getContext(); if (context != null) { Map evaluatorMap = (Map) context .getObject(CoreConstants.EVALUATOR_MAP); EventEvaluator<ILoggingEvent> ee = (EventEvaluator<ILoggingEvent>) evaluatorMap .get(evaluatorStr); if (ee != null) { addEvaluator(ee); } } } } }
errorCount++; if (errorCount < MAX_ERROR_COUNT) { addError("Exception thrown for evaluator named [" + ee.getName() + "]", eex); } else if (errorCount == MAX_ERROR_COUNT) { "This was the last warning about this evaluator's errors." + "We don't want the StatusManager to get flooded.", this)); addStatus(errorStatus);
private void checkRange() { if (depthStart < 0 || depthEnd < 0) { addError("Invalid depthStart/depthEnd range [" + depthStart + ", " + depthEnd + "] (negative values are not allowed)"); } else if (depthStart >= depthEnd) { addError("Invalid depthEnd range [" + depthStart + ", " + depthEnd + "] (start greater or equal to end)"); } }
@SuppressWarnings("unchecked") public void start() { String depthStr = getFirstOption(); if (depthStr == null) { return; } try { depth = Integer.parseInt(depthStr); } catch (NumberFormatException nfe) { addError("Failed to parse depth option [" + depthStr + "]", nfe); } final List optionList = getOptionList(); if (optionList != null && optionList.size() > 1) { final int optionListSize = optionList.size(); for (int i = 1; i < optionListSize; i++) { String evaluatorStr = (String) optionList.get(i); Context context = getContext(); if (context != null) { Map evaluatorMap = (Map) context .getObject(CoreConstants.EVALUATOR_MAP); EventEvaluator<ILoggingEvent> ee = (EventEvaluator<ILoggingEvent>) evaluatorMap .get(evaluatorStr); if (ee != null) { addEvaluator(ee); } } } } }
private void checkRange() { if (depthStart < 0 || depthEnd < 0) { addError("Invalid depthStart/depthEnd range [" + depthStart + ", " + depthEnd + "] (negative values are not allowed)"); } else if (depthStart >= depthEnd) { addError("Invalid depthEnd range [" + depthStart + ", " + depthEnd + "] (start greater or equal to end)"); } }
@SuppressWarnings("unchecked") public void start() { String depthStr = getFirstOption(); if (depthStr == null) { return; if (isRange(depthStr)) { String[] numbers = splitRange(depthStr); if (numbers.length == 2) { depthStart = Integer.parseInt(numbers[0]); depthEnd = Integer.parseInt(numbers[1]); checkRange(); } else { addError("Failed to parse depth option as range [" + depthStr + "]"); addError("Failed to parse depth option [" + depthStr + "]", nfe); final List<String> optionList = getOptionList(); for (int i = 1; i < optionListSize; i++) { String evaluatorStr = optionList.get(i); Context context = getContext(); if (context != null) { Map<String, EventEvaluator<?>> evaluatorMap = (Map<String, EventEvaluator<?>>) context .get(evaluatorStr); if (ee != null) { addEvaluator(ee);
@SuppressWarnings("unchecked") public void start() { String depthStr = getFirstOption(); if (depthStr == null) { return; } try { depth = Integer.parseInt(depthStr); } catch (NumberFormatException nfe) { addError(""); } final List optionList = getOptionList(); if (optionList != null && optionList.size() > 1) { final int optionListSize = optionList.size(); for (int i = 1; i < optionListSize; i++) { String evaluatorStr = (String) optionList.get(i); Context context = getContext(); if (context != null) { Map evaluatorMap = (Map) context .getObject(CoreConstants.EVALUATOR_MAP); EventEvaluator<ILoggingEvent> ee = (EventEvaluator<ILoggingEvent>) evaluatorMap .get(evaluatorStr); if (ee != null) { addEvaluator(ee); } } } } }
errorCount++; if (errorCount < MAX_ERROR_COUNT) { addError("Exception thrown for evaluator named [" + ee.getName() + "]", eex); } else if (errorCount == MAX_ERROR_COUNT) { "This was the last warning about this evaluator's errors." + "We don't want the StatusManager to get flooded.", this)); addStatus(errorStatus); buf.append(getCallerLinePrefix()); buf.append(i); buf.append("\t at ");
private void checkRange() { if (depthStart < 0 || depthEnd < 0) { addError("Invalid depthStart/depthEnd range [" + depthStart + ", " + depthEnd + "] (negative values are not allowed)"); } else if (depthStart >= depthEnd) { addError("Invalid depthEnd range [" + depthStart + ", " + depthEnd + "] (start greater or equal to end)"); } }
private String[] splitRange(String depthStr) { return depthStr.split(quote(getDefaultRangeDelimiter()), 2); }
@SuppressWarnings("unchecked") public void start() { String depthStr = getFirstOption(); if (depthStr == null) { return; if (isRange(depthStr)) { String[] numbers = splitRange(depthStr); if (numbers.length == 2) { depthStart = Integer.parseInt(numbers[0]); depthEnd = Integer.parseInt(numbers[1]); checkRange(); } else { addError("Failed to parse depth option as range [" + depthStr + "]"); addError("Failed to parse depth option [" + depthStr + "]", nfe); final List<String> optionList = getOptionList(); for (int i = 1; i < optionListSize; i++) { String evaluatorStr = optionList.get(i); Context context = getContext(); if (context != null) { Map<String, EventEvaluator<?>> evaluatorMap = (Map<String, EventEvaluator<?>>) context.getObject(CoreConstants.EVALUATOR_MAP); EventEvaluator<ILoggingEvent> ee = (EventEvaluator<ILoggingEvent>) evaluatorMap.get(evaluatorStr); if (ee != null) { addEvaluator(ee);
errorCount++; if (errorCount < MAX_ERROR_COUNT) { addError("Exception thrown for evaluator named [" + ee.getName() + "]", eex); } else if (errorCount == MAX_ERROR_COUNT) { ErrorStatus errorStatus = new ErrorStatus("Exception thrown for evaluator named [" + ee.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); buf.append(getCallerLinePrefix()); buf.append(i); buf.append("\t at ");
private void checkRange() { if (depthStart < 0 || depthEnd < 0) { addError("Invalid depthStart/depthEnd range [" + depthStart + ", " + depthEnd + "] (negative values are not allowed)"); } else if (depthStart >= depthEnd) { addError("Invalid depthEnd range [" + depthStart + ", " + depthEnd + "] (start greater or equal to end)"); } }
private boolean isRange(String depthStr) { return depthStr.contains(getDefaultRangeDelimiter()); }
@SuppressWarnings("unchecked") public void start() { String depthStr = getFirstOption(); if (depthStr == null) { return; if (isRange(depthStr)) { String[] numbers = splitRange(depthStr); if (numbers.length == 2) { depthStart = Integer.parseInt(numbers[0]); depthEnd = Integer.parseInt(numbers[1]); checkRange(); } else { addError("Failed to parse depth option as range [" + depthStr + "]"); addError("Failed to parse depth option [" + depthStr + "]", nfe); final List<String> optionList = getOptionList(); for (int i = 1; i < optionListSize; i++) { String evaluatorStr = optionList.get(i); Context context = getContext(); if (context != null) { Map<String, EventEvaluator<?>> evaluatorMap = (Map<String, EventEvaluator<?>>) context.getObject(CoreConstants.EVALUATOR_MAP); EventEvaluator<ILoggingEvent> ee = (EventEvaluator<ILoggingEvent>) evaluatorMap.get(evaluatorStr); if (ee != null) { addEvaluator(ee);
errorCount++; if (errorCount < MAX_ERROR_COUNT) { addError("Exception thrown for evaluator named [" + ee.getName() + "]", eex); } else if (errorCount == MAX_ERROR_COUNT) { "This was the last warning about this evaluator's errors." + "We don't want the StatusManager to get flooded.", this)); addStatus(errorStatus); buf.append(getCallerLinePrefix()); buf.append(i); buf.append("\t at ");
private void checkRange() { if (depthStart < 0 || depthEnd < 0) { addError("Invalid depthStart/depthEnd range [" + depthStart + ", " + depthEnd + "] (negative values are not allowed)"); } else if (depthStart >= depthEnd) { addError("Invalid depthEnd range [" + depthStart + ", " + depthEnd + "] (start greater or equal to end)"); } }