common/src/main/java/HTTPClient/Log.java
/**
     * Write the stack trace of the given exception to the current log if logging for the
     * given facility is enabled.
     *
     * @param facility  the facility which is logging the message
     * @param prefix    the string with which to prefix the stack trace; may be null
     * @param t         the exception to log
     */
Write the stack trace of the given exception to the current log if logging for the
given facility is enabled.

@param facility  the facility which is logging the message
@param prefix    the string with which to prefix the stack trace; may be null
@param t         the exception to log
Write the stack trace of the given exception to the current log if logging for the given facility is enabled . @param facility the facility which is logging the message @param prefix the string with which to prefix the stack trace ; may be null @param t the exception to log
public static void write(int facility, String prefix, Throwable t)
    {
	if ((facMask & facility) == 0)
	    return;
	synchronized (Log.class)
	{
	    if (!(logWriter instanceof PrintWriter))
		logWriter = new PrintWriter(logWriter);
	}
	try
	{
	    writePrefix();
	    if (prefix != null)
		logWriter.write(prefix);
	    t.printStackTrace((PrintWriter) logWriter);
	    logWriter.flush();
	}
	catch (IOException ioe)
	{
	    System.err.println("Failed to write to log: " + ioe);
	    System.err.print("Failed log Entry was: " + prefix);
	    t.printStackTrace(System.err);
	}
    }
public static void write ( int facility , String prefix , Throwable t ) { if ( ( facMask & facility ) == 0 ) return ; synchronized ( Log . class ) { if ( ! ( logWriter instanceof PrintWriter ) ) logWriter = new PrintWriter ( logWriter ) ; } try { writePrefix ( ) ; if ( prefix != null ) logWriter . write ( prefix ) ; t . printStackTrace ( ( PrintWriter ) logWriter ) ; logWriter . flush ( ) ; } catch ( IOException ioe ) { System . err . println ( "Failed to write to log: " + ioe ) ; System . err . print ( "Failed log Entry was: " + prefix ) ; t . printStackTrace ( System . err ) ; } }
Write the stack trace of the given exception to the current log if logging for the
 given facility is enabled.
Write the stack trace of the given exception to the current log if logging for the given facility is enabled .