// SwingUtil.java
// See copyright.txt for license and terms of use.

package util.swing;

/** Collection of Swing-related utility routines. */
public class SwingUtil {
    /** The thread that last issued a 'log' command.  This is used to
      * only log thread names when there is interleaving. */
    private static Thread lastLoggedThread = null;

    /** Print a message to the console with a timestamp. */
    public static synchronized void log(String msg)
    {
        Thread t = Thread.currentThread();
        if (t != SwingUtil.lastLoggedThread) {
            System.out.println(""+System.currentTimeMillis()+
                               " ["+t.getName()+"]"+
                               ": "+msg);
            SwingUtil.lastLoggedThread = t;
        }
        else {
            System.out.println(""+System.currentTimeMillis()+
                               ": "+msg);
        }
    }
}

// EOF

@@ -898,16 +898,300 @@
  %7D%0A    %7D
+%0A%0A    /** Split 'msg' into separate lines and log each of them with 'prefix'%0A      * in front. */%0A    public static void logMultiline(String prefix, String msg)%0A    %7B%0A        String%5B%5D lines = msg.split(%22%5Cn%22);%0A        for (String s : lines) %7B%0A            log(prefix+s);%0A        %7D%0A    %7D
 %0A%7D%0A%0A// E

add 'logMultiline', although it is not used (it is used in code that is not yet checked in, and might not be)