164165166167168169170171172173174
writeRetrieveLocation(saxHandler, artifactDestPath); } saxHandler.endElement(null, "artifact", "artifact"); } } saxHandler.endElement(null, "module", "module"); } saxHandler.endElement(null, "modules", "modules"); saxHandler.endDocument(); } finally { fileOuputStream.close();
166167168169170171172173174175176
saxHandler.endElement(null, "artifact", "artifact"); } } saxHandler.endElement(null, "module", "module"); } saxHandler.endElement(null, "modules", "modules"); saxHandler.endDocument(); } finally { fileOuputStream.close(); } } catch (SAXException e) {
284285286287288289290291292293294
transformer.startElement(LOG4J_NS, "message", "message", attrs); String msg = event.getRenderedMessage(); if (msg != null && msg.length() > 0) { transformer.characters(msg.toCharArray(), 0, msg.length()); } transformer.endElement(LOG4J_NS, "message", "message"); // // NDC element // String ndc = event.getNDC();
294295296297298299300301302303304
String ndc = event.getNDC(); if (ndc != null) { transformer.startElement(LOG4J_NS, "NDC", "NDC", attrs); char[] ndcChars = ndc.toCharArray(); transformer.characters(ndcChars, 0, ndcChars.length); transformer.endElement(LOG4J_NS, "NDC", "NDC"); } // // throwable element unless suppressed //
311312313314315316317318319320321
for (int i = 0; i < s.length; i++) { char[] line = s[i].toCharArray(); transformer.characters(line, 0, line.length); transformer.characters(nl, 0, nl.length); } transformer.endElement(LOG4J_NS, "throwable", "throwable"); } } // // location info unless suppressed
331332333334335336337338339340341
locationInfo.getFileName()); attrs.addAttribute(null, "line", "line", "CDATA", locationInfo.getLineNumber()); transformer.startElement(LOG4J_NS, "locationInfo", "locationInfo", attrs); transformer.endElement(LOG4J_NS, "locationInfo", "locationInfo"); } if (properties) { //
356357358359360361362363364365366
attrs.addAttribute(null, "name", "name", "CDATA", key); attrs.addAttribute(null, "value", "value", "CDATA", val.toString()); transformer.startElement(LOG4J_NS, "data", "data", attrs); transformer.endElement(LOG4J_NS, "data", "data"); } } }
362363364365366367368369370371372
} } } transformer.endElement(LOG4J_NS, "event", "event"); transformer.endDocument(); String body = encoding.decode( ByteBuffer.wrap(outputStream.toByteArray())).toString(); outputStream.reset();
160161162163164165166167168169170
for (Iterator iterator = artifactDestPaths.iterator(); iterator .hasNext();) { String artifactDestPath = (String) iterator.next(); writeRetrieveLocation(saxHandler, artifactDestPath); } saxHandler.endElement(null, "artifact", "artifact"); } } saxHandler.endElement(null, "module", "module"); } saxHandler.endElement(null, "modules", "modules");
163164165166167168169170171172173