com.hazelcast.util
Class DebugUtil

java.lang.Object
  extended by com.hazelcast.util.DebugUtil

public final class DebugUtil
extends Object

Contains some debugging functionality; useful if you are running large testsuites and can't rely on a debugger.


Method Summary
static void appendStackTrace(File file)
          Appends the stacktrace of the current thread to a file.
static void appendWithNewLine(File file, String s)
          Appends text to a file.
static void printStackTrace(String msg)
          Prints the stacktrace of the calling thread to System.out.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

printStackTrace

public static void printStackTrace(String msg)
Prints the stacktrace of the calling thread to System.out.

Parameters:
msg - debug message

appendStackTrace

public static void appendStackTrace(File file)
Appends the stacktrace of the current thread to a file.

If something fails while writing to the file, the exception is printed and then ignored.

Parameters:
file - the file to which the stacktrace of the current thread is appended.
Throws:
NullPointerException - if file is null.

appendWithNewLine

public static void appendWithNewLine(File file,
                                     String s)
Appends text to a file.

If something fails while writing to the file, the exception is printed and then ignored.

Parameters:
file - the file to which text is appended.
s - the text to append to the file.
Throws:
NullPointerException - if file is null


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.