cz.cuni.amis.pogamut.base.utils.logging
Class LogPublisher.FilePublisher

java.lang.Object
  extended by cz.cuni.amis.pogamut.base.utils.logging.LogPublisher
      extended by cz.cuni.amis.pogamut.base.utils.logging.LogPublisher.FilePublisher
All Implemented Interfaces:
ILogPublisher
Enclosing class:
LogPublisher

public static class LogPublisher.FilePublisher
extends LogPublisher


Nested Class Summary
 
Nested classes/interfaces inherited from class cz.cuni.amis.pogamut.base.utils.logging.LogPublisher
LogPublisher.ConsolePublisher, LogPublisher.FilePublisher
 
Field Summary
protected  java.io.File file
           
protected  java.io.FileOutputStream fileOut
           
protected  java.io.PrintWriter fileWriter
           
 
Fields inherited from class cz.cuni.amis.pogamut.base.utils.logging.LogPublisher
formatter
 
Constructor Summary
LogPublisher.FilePublisher(java.io.File file)
           
LogPublisher.FilePublisher(java.io.File file, java.util.logging.Formatter formatter)
           
 
Method Summary
 void close()
          From JavaDoc API:
 void flush()
          From JavaDoc API:
 java.io.File getFile()
           
 void publish(java.util.logging.LogRecord record, java.lang.String formattedMsg)
           
 
Methods inherited from class cz.cuni.amis.pogamut.base.utils.logging.LogPublisher
getFormatter, publish, setFormatter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

file

protected java.io.File file

fileOut

protected java.io.FileOutputStream fileOut

fileWriter

protected java.io.PrintWriter fileWriter
Constructor Detail

LogPublisher.FilePublisher

public LogPublisher.FilePublisher(java.io.File file)
                           throws PogamutIOException
Throws:
PogamutIOException

LogPublisher.FilePublisher

public LogPublisher.FilePublisher(java.io.File file,
                                  java.util.logging.Formatter formatter)
                           throws PogamutIOException
Throws:
PogamutIOException
Method Detail

getFile

public java.io.File getFile()

close

public void close()
           throws java.lang.SecurityException
Description copied from interface: ILogPublisher
From JavaDoc API:

Close the Handler and free all associated resources.

The close method will perform a flush and then close the Handler. After close has been called this Handler should no longer be used. Method calls may either be silently ignored or may throw runtime exceptions.

Specified by:
close in interface ILogPublisher
Specified by:
close in class LogPublisher
Throws:
java.lang.SecurityException - if a security manager exists and if the caller does not have LoggingPermission("control").

flush

public void flush()
Description copied from interface: ILogPublisher
From JavaDoc API:

Flush any buffered output.

Specified by:
flush in interface ILogPublisher
Specified by:
flush in class LogPublisher

publish

public void publish(java.util.logging.LogRecord record,
                    java.lang.String formattedMsg)
Specified by:
publish in class LogPublisher