de.infinityloop.util.log
Class LogFile

java.lang.Object
  extended by de.infinityloop.util.log.LogFile

public class LogFile
extends java.lang.Object

Reworked to just be a wrapper around Log4Java.


Field Summary
static int kLogAlways
           
static int kLogNever
           
static int kMaxLogEntriesPerFile
           
 
Constructor Summary
LogFile(java.lang.String fileName, boolean destAsStream)
          constructor
 
Method Summary
 boolean closeLogFile()
           
 boolean getLogFlag(int logNumber)
           
 java.lang.String getLogFlagName(int logNumber)
           
 java.lang.String getName()
           
 java.io.OutputStream getOutStream()
          Returns the currently set output stream for this log file, or null if it's outputting in file mode.
 boolean logError(java.lang.String error)
           
 boolean logStatus(int logNumber, java.lang.String status)
          writes a status message into the logFile but does not terminate the message with a newline
 boolean logStatusln(int logNumber, java.lang.String status)
          writes a status message into the logFile and terminates the message with a newline
 void setLogFlag(int logNumber, boolean b)
           
 void setLogFlagName(int logNumber, java.lang.String name)
           
 void setOutStream(java.io.OutputStream s)
          Sets a new output stream for the log file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

kMaxLogEntriesPerFile

public static final int kMaxLogEntriesPerFile
See Also:
Constant Field Values

kLogNever

public static final int kLogNever
See Also:
Constant Field Values

kLogAlways

public static final int kLogAlways
See Also:
Constant Field Values
Constructor Detail

LogFile

public LogFile(java.lang.String fileName,
               boolean destAsStream)
constructor

Method Detail

getName

public java.lang.String getName()

closeLogFile

public boolean closeLogFile()

logStatus

public boolean logStatus(int logNumber,
                         java.lang.String status)
writes a status message into the logFile but does not terminate the message with a newline


logStatusln

public boolean logStatusln(int logNumber,
                           java.lang.String status)
writes a status message into the logFile and terminates the message with a newline


logError

public boolean logError(java.lang.String error)

getLogFlag

public boolean getLogFlag(int logNumber)

setLogFlag

public void setLogFlag(int logNumber,
                       boolean b)

setLogFlagName

public void setLogFlagName(int logNumber,
                           java.lang.String name)

getLogFlagName

public java.lang.String getLogFlagName(int logNumber)

setOutStream

public void setOutStream(java.io.OutputStream s)
Sets a new output stream for the log file.


getOutStream

public java.io.OutputStream getOutStream()
Returns the currently set output stream for this log file, or null if it's outputting in file mode.