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

## PER.rover
Class Log

    java.lang.Object
      PER.rover.Log

public class Log
extends java.lang.Object

A human-readable output log for the rover. Any string printed to the log file will be prefaced by a time stamp. Other than the time stamp, strings do not have any special format requirements.

Constructor Summary
`Log()` Creates a new instance of Log

Method Summary
`static void` | `initLogFile(java.lang.String name)` Initializes the log file with the given name.
`static void` | `initLogFile(java.lang.String name, javax.swing.JTextArea textArea)` Initializes the log file with the given name and associated JTextArea.
`static void` | `print(java.lang.String str)` Print a string to the logfile.
`static void` | `print(java.lang.String str, boolean printToConsole)` Print a string to the logfile.
`static void` | `println(java.lang.String str)` Print a line to the logfile
`static void` | `println(java.lang.String str, boolean printToConsole)` Print a line to the logfile.

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

Constructor Detail

### Log

    public Log()

  Creates a new instance of Log

Method Detail

### initLogFile

    public static void initLogFile(java.lang.String name)

  Initializes the log file with the given name. If the log has not been initalized, all strings will be printed to System.out.

### initLogFile

    public static void initLogFile(java.lang.String name,
                                   javax.swing.JTextArea textArea)

  Initializes the log file with the given name and associated JTextArea. If a non-null textArea is given, strings printed to the log and console will also be printed to the textArea. If the log has not been initalized, all strings will be printed to System.out.

### println

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

  Print a line to the logfile

### println

    public static void println(java.lang.String str,
                               boolean printToConsole)

  Print a line to the logfile. If printToConsole is true, then echo the line to System.out.

### print

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

  Print a string to the logfile.

### print

    public static void print(java.lang.String str,
                             boolean printToConsole)

  Print a string to the logfile. If printToConsole is true, echos the string to System.out.

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