Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.knowgate.debug
Class DebugFile

    java.lang.Object
      com.knowgate.debug.DebugFile

    public final class DebugFile

extends java.lang.Object

Write execution traces to a flat text file

Traces are written to javatrc.txt file on the especified directory.
By default /tmp/ on Unix and C:\WINNT\TEMP or C:\WINDOWS\TEMP on Windows.

Field Summary
`static short` | `DUMP_TO_FILE`
`static short` | `DUMP_TO_STDOUT`
`static short` | `dumpTo`
`static boolean` | `trace` Activate/Deactive trace output

Constructor Summary
`DebugFile()`

Method Summary
`void` | `debug(java.lang.String str)` This method is just an alias for DebugFile.writeln
`void` | `debug(java.lang.String str, java.lang.Exception xcpt)`
`static void` | `decIdent()` Decrement identation level
`static void` | `envinfo()`
`static java.lang.String` | `getFile()` Get debug file path
`static void` | `incIdent()` Increment identation level Maximum identation level is 80, after reaching that limit identation is automatically set to zero
`static void` | `main(java.lang.String[] argv)`
`static void` | `setFile(java.lang.String sDebugFilePath)` Set debug file path
`static void` | `write(char[] str)` Write trace Traces are written to /tmp/javatrc.txt on UNIX systems or C:\WINNT\javatrc.txt on Windows
`static void` | `write(java.lang.String str)` Write trace Traces are written to /tmp/javatrc.txt on UNIX systems or C:\WINNT\javatrc.txt on Windows
`static void` | `writeln(char[] str)` Write trace and append line feed
`static void` | `writeln(java.lang.String str)` Write trace and append line feed
`static void` | `writeStackTrace(java.lang.Throwable t)` Write stack trace for an exception to debug file

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### DUMP_TO_FILE

    public static final short DUMP_TO_FILE

See Also:
  Constant Field Values

### DUMP_TO_STDOUT

    public static final short DUMP_TO_STDOUT

See Also:
  Constant Field Values

### dumpTo

    public static short dumpTo

### trace

    public static final boolean trace

  Activate/Deactive trace output

  See Also:
    Constant Field Values

Constructor Detail

### DebugFile

    public DebugFile()

Method Detail

### setFile

    public static void setFile(java.lang.String sDebugFilePath)

  Set debug file path

  Parameters:
    `sDebugFilePath` - Full path to file where debug traces will be written including directory and file name

### getFile

    public static java.lang.String getFile()

  Get debug file path

  Returns:
    If setFile() has not been called this method returns C:\\javatrc.txt on Windows environments or /tmp/javatrc.txt on UNIX environments
  Since:
    v2.2 the behaviour of this method has changed and now reads Java environment variable hipergate.debugdir for getting the directory where javatrc.txt file is generated

### incIdent

    public static void incIdent()

  Increment identation level Maximum identation level is 80, after reaching that limit identation is automatically set to zero

### decIdent

    public static void decIdent()

  Decrement identation level

### write

    public static void write(char[] str)

  Write trace

  Traces are written to /tmp/javatrc.txt on UNIX systems or C:\WINNT\javatrc.txt on Windows

### write

    public static void write(java.lang.String str)

  Write trace

  Traces are written to /tmp/javatrc.txt on UNIX systems or C:\WINNT\javatrc.txt on Windows

### writeln

    public static void writeln(java.lang.String str)

  Write trace and append line feed

  Parameters:
    `str` -

### writeln

    public static void writeln(char[] str)

  Write trace and append line feed

  Parameters:
    `str` -

### writeStackTrace

    public static void writeStackTrace(java.lang.Throwable t)

  Write stack trace for an exception to debug file

  Parameters:
    `t` - Throwable

### debug

    public void debug(java.lang.String str)

  This method is just an alias for DebugFile.writeln

  Parameters:
    `str` -

### debug

    public void debug(java.lang.String str,
                      java.lang.Exception xcpt)

### envinfo

    public static void envinfo()
                        throws java.security.AccessControlException

  Throws:
    `java.security.AccessControlException`

### main

    public static void main(java.lang.String[] argv)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD