org.jagatoo.logging
Class FileLog

java.lang.Object
  extended by org.jagatoo.logging.FileLog
All Implemented Interfaces:
LogInterface

public class FileLog
extends java.lang.Object
implements LogInterface

This class implements the LogInterface and adds support for writing logs to files. The filename is specified in the constructor.


Constructor Summary
FileLog(int channelFilter, int logLevel, java.lang.String filename)
           
FileLog(int logLevel, java.lang.String filename)
           
FileLog(java.lang.String filename)
           
 
Method Summary
 boolean acceptsChannel(LogChannel channel)
           
 void close()
          
 void flush()
          
 int getChannelFilter()
           
 int getLogLevel()
           
 void print(LogChannel channel, int logLevel, java.lang.String message)
          
 void println(LogChannel channel, int logLevel, java.lang.String message)
          
 void setChannelFilter(int filter)
           
 void setLogLevel(int logLevel)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileLog

public FileLog(int channelFilter,
               int logLevel,
               java.lang.String filename)
        throws java.io.FileNotFoundException
Throws:
java.io.FileNotFoundException

FileLog

public FileLog(int logLevel,
               java.lang.String filename)
        throws java.io.FileNotFoundException
Throws:
java.io.FileNotFoundException

FileLog

public FileLog(java.lang.String filename)
        throws java.io.FileNotFoundException
Throws:
java.io.FileNotFoundException
Method Detail

setLogLevel

public final void setLogLevel(int logLevel)

getLogLevel

public final int getLogLevel()
Specified by:
getLogLevel in interface LogInterface

setChannelFilter

public final void setChannelFilter(int filter)

getChannelFilter

public final int getChannelFilter()
Specified by:
getChannelFilter in interface LogInterface

acceptsChannel

public final boolean acceptsChannel(LogChannel channel)

print

public void print(LogChannel channel,
                  int logLevel,
                  java.lang.String message)

Specified by:
print in interface LogInterface

println

public void println(LogChannel channel,
                    int logLevel,
                    java.lang.String message)

Specified by:
println in interface LogInterface

flush

public void flush()

Specified by:
flush in interface LogInterface

close

public void close()

Specified by:
close in interface LogInterface