Logs an issue while parsing XML.

@param prefix
log level as string to add at the beginning of the message
@param e
exception to log
509106
protected static void logParsingIssue(final String prefix, final SAXParseException e) {
		final StringBuilder buffer = new StringBuilder();
		buffer.append(prefix);
		buffer.append(" while reading UAS data: ");
		buffer.append(e.getMessage());
		buffer.append(" (line: ");
		buffer.append(e.getLineNumber());
		if (e.getSystemId() != null) {
			buffer.append(" uri: ");
			buffer.append(e.getSystemId());
		}
		buffer.append(")");
		LOG.warn(buffer.toString());
	}
395853
public void exception(Throwable e) {
    final String msg = e.getMessage();
    log(Level.SEVERE, msg != null ? msg : "An exception occurred.", e);
  }
834259
def log(self, level, prefix = ''):
        
        logging.log(level, "%sin interface: %s", prefix, self.in_interface)
        logging.log(level, "%sout interface: %s", prefix, self.out_interface)
        logging.log(level, "%ssource: %s", prefix, self.source)
        logging.log(level, "%sdestination: %s", prefix, self.destination)
        logging.log(level, "%smatches:", prefix)
        for match in self.matches:
            match.log(level, prefix + '  ')
        if self.jump:
            logging.log(level, "%sjump:", prefix)
            self.jump.log(level, prefix + '  ')
634144
@SuppressWarnings("unused")
	public void setPrefix(String prefix, String namespace) throws IOException {
		if (startTagIncomplete)
			closeStartTag();
		// assert prefix != null;
		// assert namespace != null;
		if (prefix == null) {
			prefix = "";
		}
		if (!namesInterned) {
			prefix = prefix.intern(); // will throw NPE if prefix==null
		} else if (checkNamesInterned) {
			checkInterning(prefix);
		} else if (prefix == null) {
			throw new IllegalArgumentException("prefix must be not null" + getLocation());
		}

		// check that prefix is not duplicated ...
		for (int i = elNamespaceCount[depth]; i < namespaceEnd; i++) {
			if (prefix == namespacePrefix[i]) {
				throw new IllegalStateException("duplicated prefix " + printable(prefix) + getLocation());
			}
		}

		if (!namesInterned) {
			namespace = namespace.intern();
		} else if (checkNamesInterned) {
			checkInterning(namespace);
		} else if (namespace == null) {
			throw new IllegalArgumentException("namespace must be not null" + getLocation());
		}

		if (namespaceEnd >= namespacePrefix.length) {
			ensureNamespacesCapacity();
		}
		namespacePrefix[namespaceEnd] = prefix;
		namespaceUri[namespaceEnd] = namespace;
		++namespaceEnd;
		setPrefixCalled = true;
	}
431245
void printSaxParseException(String message,
                                SAXParseException e) {
        System.err.println();
        System.err.println("*** SAX Parse Exception -- " + message);
        System.err.println("      SystemId = \"" + e.getSystemId() + "\"");
        System.err.println("      PublicId = \"" + e.getPublicId() + "\"");
        System.err.println("      line number " + e.getLineNumber());
        e.printStackTrace(System.err);
    }
531365
public void error(CharSequence message, Throwable e) {
    log(Level.SEVERE, message, e);
  }
328133
public void debugFine(CharSequence message, Throwable e) {
    log(Level.FINE, message, e);
  }
270766
private void print(String level, SAXParseException exception) {
        if (level.equals("warning")) {
            logger.warn("** " + level + ": " + exception.getMessage());
            logger.warn("   URI  = " + exception.getSystemId());
            logger.warn("   line = " + exception.getLineNumber());
        } else {
            logger.error("** " + level + ": " + exception.getMessage());
            logger.error("   URI  = " + exception.getSystemId());
            logger.error("   line = " + exception.getLineNumber());
        }
    }
604323
public void debug(String msg, Throwable e) {
        doLog(msg, LOG_DEBUG, null, e);
    }
274850
public static LoggingException createLoggingException(
			final ErrorKeys errorId, final Exception e)
	{

		return new LoggingException(errorId.toString(), e);
	}
1151695
public void info(String msg, Throwable e) {
        doLog(msg, LOG_INFO, null, e);
    }
1071461
public static void exception(String message, Throwable e) {
    if(message == null && e != null) {
      message = e.getMessage();
    }
    logExpensive(Level.SEVERE, message, e);
  }
680324
public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e) throws Exception {
        Throwable cause = e.getCause();

        // do not print exception if it is BindException.
        // we are trying to search available port below 1024. It is not good to
        // print a flood
        // of error logs during the searching.
        if (cause instanceof java.net.BindException) {
            return;
        }

        LOG.error("Exception on connection to " + getRemoteAddress(), e.getCause());

        // close the channel unless we are connecting and it is
        // NotYetConnectedException
        if (!((cause instanceof NotYetConnectedException)
                && _connection.getConnectionState().equals(Connection.State.CONNECTING))) {
            ctx.getChannel().close();
        }
    }
889315
@Override
  public void log(Level level, Object message, Throwable e) {
    java.util.logging.Level sLevel = java.util.logging.Level.SEVERE;

    switch (level == null ? Level.FATAL : level) {
    case TRACE:
      sLevel = java.util.logging.Level.FINEST;
      break;
    case DEBUG:
      sLevel = java.util.logging.Level.FINE;
      break;
    case INFO:
      sLevel = java.util.logging.Level.INFO;
      break;
    case WARN:
      sLevel = java.util.logging.Level.WARNING;
      break;
    case ERROR:
      sLevel = java.util.logging.Level.SEVERE;
      break;
    case FATAL:
      sLevel = java.util.logging.Level.SEVERE;
      break;
    default:
      // I don't know what this is, so consider it fatal
      sLevel = java.util.logging.Level.SEVERE;
      sunLogger.log(sLevel, "Unhandled log level:  " + level
          + " for the following message");
    }

    // Figure out who was logging.
    Throwable t = new Throwable();
    StackTraceElement[] ste = t.getStackTrace();
    StackTraceElement logRequestor = null;
    String alclass = AbstractLogger.class.getName();
    for (int i = 0; i < ste.length && logRequestor == null; i++) {
      if (ste[i].getClassName().equals(alclass)) {
        // Make sure there's another stack frame.
        if (i + 1 < ste.length) {
          logRequestor = ste[i + 1];
          if (logRequestor.getClassName().equals(alclass)) {
            logRequestor = null;
          } // Also AbstractLogger
        } // Found something that wasn't abstract logger
      } // check for abstract logger
    }

    // See if we could figure out who was doing the original logging,
    // if we could, we want to include a useful class and method name
    if (logRequestor != null) {
      if (e != null) {
        sunLogger.logp(sLevel, logRequestor.getClassName(),
            logRequestor.getMethodName(), message.toString(), e);
      } else {
        sunLogger.logp(sLevel, logRequestor.getClassName(),
            logRequestor.getMethodName(), message.toString());
      }
    } else {
      if (e != null) {
        sunLogger.log(sLevel, message.toString(), e);
      } else {
        sunLogger.log(sLevel, message.toString());
      }
    }
  }
171622
public static void logException( Logger logger, Throwable t ) {
		logException( logger, Level.FINEST, t );
	}
25883
protected static StringBuilder handleExceptionStart(Exception e) {
        LOG.warning(ExceptionUtils.getStackTrace(e));
        StringBuilder sb = new StringBuilder();
        if (e.getMessage() != null) {
            sb.append(e.getMessage()).append(". ");
        }
        if (e.getCause() != null && e.getCause().getMessage() != null) {
            sb.append(e.getCause().getMessage()).append(". ");
        }
        return sb;
    }
891194
private static void logException(String tag, Throwable t) {
        Log.e(tag, "%s in thread %d", t, threadId());
        t.printStackTrace();
    }