/** * Logs the specified XML to the TraceListener if tracing is enabled. * * @param traceType Kind of trace entry. * @param stream The stream containing XML. */ public void traceXml(TraceFlags traceType, ByteArrayOutputStream stream) { if (this.isTraceEnabledFor(traceType)) { String traceTypeStr = traceType.toString(); String logMessage = EwsUtilities.formatLogMessageWithXmlContent(traceTypeStr, stream); this.traceListener.trace(traceTypeStr, logMessage); } }
/** * Logs the specified string to the TraceListener if tracing is enabled. * * @param traceType kind of trace entry * @param logEntry the entry to log * @throws XMLStreamException the XML stream exception * @throws IOException signals that an I/O exception has occurred */ public void traceMessage(TraceFlags traceType, String logEntry) throws XMLStreamException, IOException { if (this.isTraceEnabledFor(traceType)) { String traceTypeStr = traceType.toString(); String logMessage = EwsUtilities.formatLogMessage(traceTypeStr, logEntry); this.traceListener.trace(traceTypeStr, logMessage); } }
/** * Traces the HTTP request headers. * * @param traceType Kind of trace entry. * @param request The request * @throws EWSHttpException EWS http exception * @throws URISyntaxException URI syntax error * @throws IOException signals that an I/O exception has occurred * @throws XMLStreamException the XML stream exception */ public void traceHttpRequestHeaders(TraceFlags traceType, HttpWebRequest request) throws URISyntaxException, EWSHttpException, XMLStreamException, IOException { if (this.isTraceEnabledFor(traceType)) { String traceTypeStr = traceType.toString(); String headersAsString = EwsUtilities.formatHttpRequestHeaders(request); String logMessage = EwsUtilities.formatLogMessage(traceTypeStr, headersAsString); this.traceListener.trace(traceTypeStr, logMessage); } }
/** * Traces the HTTP response headers. * * @param traceType kind of trace entry * @param request the HttpRequest object * @throws XMLStreamException the XML stream exception * @throws IOException signals that an I/O exception has occurred * @throws EWSHttpException the EWS http exception */ private void traceHttpResponseHeaders(TraceFlags traceType, HttpWebRequest request) throws XMLStreamException, IOException, EWSHttpException { if (this.isTraceEnabledFor(traceType)) { String traceTypeStr = traceType.toString(); String headersAsString = EwsUtilities.formatHttpResponseHeaders(request); String logMessage = EwsUtilities.formatLogMessage(traceTypeStr, headersAsString); this.traceListener.trace(traceTypeStr, logMessage); } }
/** * Logs the specified XML to the TraceListener if tracing is enabled. * * @param traceType Kind of trace entry. * @param stream The stream containing XML. */ public void traceXml(TraceFlags traceType, ByteArrayOutputStream stream) { if (this.isTraceEnabledFor(traceType)) { String traceTypeStr = traceType.toString(); String logMessage = EwsUtilities.formatLogMessageWithXmlContent(traceTypeStr, stream); this.traceListener.trace(traceTypeStr, logMessage); } }
/** * Logs the specified string to the TraceListener if tracing is enabled. * * @param traceType kind of trace entry * @param logEntry the entry to log * @throws XMLStreamException the XML stream exception * @throws IOException signals that an I/O exception has occurred */ public void traceMessage(TraceFlags traceType, String logEntry) throws XMLStreamException, IOException { if (this.isTraceEnabledFor(traceType)) { String traceTypeStr = traceType.toString(); String logMessage = EwsUtilities.formatLogMessage(traceTypeStr, logEntry); this.traceListener.trace(traceTypeStr, logMessage); } }
/** * Traces the HTTP response headers. * * @param traceType kind of trace entry * @param request the HttpRequest object * @throws XMLStreamException the XML stream exception * @throws IOException signals that an I/O exception has occurred * @throws EWSHttpException the EWS http exception */ private void traceHttpResponseHeaders(TraceFlags traceType, HttpWebRequest request) throws XMLStreamException, IOException, EWSHttpException { if (this.isTraceEnabledFor(traceType)) { String traceTypeStr = traceType.toString(); String headersAsString = EwsUtilities.formatHttpResponseHeaders(request); String logMessage = EwsUtilities.formatLogMessage(traceTypeStr, headersAsString); this.traceListener.trace(traceTypeStr, logMessage); } }
/** * Traces the HTTP request headers. * * @param traceType Kind of trace entry. * @param request The request * @throws EWSHttpException EWS http exception * @throws URISyntaxException URI syntax error * @throws IOException signals that an I/O exception has occurred * @throws XMLStreamException the XML stream exception */ public void traceHttpRequestHeaders(TraceFlags traceType, HttpWebRequest request) throws URISyntaxException, EWSHttpException, XMLStreamException, IOException { if (this.isTraceEnabledFor(traceType)) { String traceTypeStr = traceType.toString(); String headersAsString = EwsUtilities.formatHttpRequestHeaders(request); String logMessage = EwsUtilities.formatLogMessage(traceTypeStr, headersAsString); this.traceListener.trace(traceTypeStr, logMessage); } }