in src/main/java/org/apache/sling/launchpad/base/webapp/SlingServletDelegate.java [450:485]
protected void doLog(
Bundle bundle, @SuppressWarnings("rawtypes") ServiceReference sr, int level,
String msg, Throwable throwable) {
// unwind throwable if it is a BundleException
if ((throwable instanceof BundleException)
&& (((BundleException) throwable).getNestedException() != null)) {
throwable = ((BundleException) throwable).getNestedException();
}
String s = (sr == null) ? null : "SvcRef " + sr;
s = (s == null) ? null : s + " Bundle '" + bundle.getBundleId() + "'";
s = (s == null) ? msg : s + " " + msg;
s = (throwable == null) ? s : s + " (" + throwable + ")";
switch (level) {
case LOG_DEBUG:
servletContext.log("DEBUG: " + s);
break;
case LOG_ERROR:
if (throwable == null) {
servletContext.log("ERROR: " + s);
} else {
servletContext.log("ERROR: " + s, throwable);
}
break;
case LOG_INFO:
servletContext.log("INFO: " + s);
break;
case LOG_WARNING:
servletContext.log("WARNING: " + s);
break;
default:
servletContext.log("UNKNOWN[" + level + "]: " + s);
}
}