private void handleLog(ShellMsg shellMsg) { String msg = shellMsg.getMsg(); msg = "ShellLog " + _process.getProcessInfoString() + " " + msg; ShellMsg.ShellLogLevel logLevel = shellMsg.getLogLevel(); switch (logLevel) { case TRACE: LOG.trace(msg); break; case DEBUG: LOG.debug(msg); break; case INFO: LOG.info(msg); break; case WARN: LOG.warn(msg); break; case ERROR: LOG.error(msg); _collector.reportError(new ReportedFailedException(msg)); break; default: LOG.info(msg); break; } }
protected void checkCassandraException(Exception e) { _mexceptions.incr(); if (e instanceof AlreadyExistsException || e instanceof AuthenticationException || e instanceof DriverException || e instanceof DriverInternalError || e instanceof InvalidConfigurationInQueryException || e instanceof InvalidQueryException || e instanceof InvalidTypeException || e instanceof QueryExecutionException || e instanceof QueryValidationException || e instanceof ReadTimeoutException || e instanceof SyntaxError || e instanceof TraceRetrievalException || e instanceof TruncateException || e instanceof UnauthorizedException || e instanceof UnavailableException || e instanceof ReadTimeoutException || e instanceof WriteTimeoutException || e instanceof ReadFailureException || e instanceof WriteFailureException || e instanceof FunctionExecutionException) { throw new ReportedFailedException(e); } else { throw new RuntimeException(e); } }
private void handleLog(ShellMsg shellMsg) { String msg = shellMsg.getMsg(); msg = "ShellLog " + _process.getProcessInfoString() + " " + msg; ShellMsg.ShellLogLevel logLevel = shellMsg.getLogLevel(); switch (logLevel) { case TRACE: LOG.trace(msg); break; case DEBUG: LOG.debug(msg); break; case INFO: LOG.info(msg); break; case WARN: LOG.warn(msg); break; case ERROR: LOG.error(msg); _collector.reportError(new ReportedFailedException(msg)); break; default: LOG.info(msg); break; } }