public static class LogPublisher.FilePublisher extends LogPublisher
LogPublisher.ConsolePublisher, LogPublisher.FilePublisher| Modifier and Type | Field and Description |
|---|---|
protected File |
file |
protected FileOutputStream |
fileOut |
protected PrintWriter |
fileWriter |
protected boolean |
immediateFlush |
formatter| Constructor and Description |
|---|
FilePublisher(File file) |
FilePublisher(File file,
Formatter formatter) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
From JavaDoc API:
Close the Handler and free all associated resources.
|
void |
flush()
From JavaDoc API:
Flush any buffered output.
|
File |
getFile() |
boolean |
isImmediateFlush() |
void |
publish(LogRecord record,
String formattedMsg) |
void |
setImmediateFlush(boolean immediateFlush) |
getFormatter, publish, setFormatterprotected File file
protected FileOutputStream fileOut
protected PrintWriter fileWriter
protected boolean immediateFlush
public FilePublisher(File file) throws cz.cuni.amis.utils.exception.PogamutIOException
cz.cuni.amis.utils.exception.PogamutIOExceptionpublic boolean isImmediateFlush()
public void setImmediateFlush(boolean immediateFlush)
public File getFile()
public void close()
throws SecurityException
ILogPublisherClose 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.
close in interface ILogPublisherclose in class LogPublisherSecurityException - if a security manager exists and if
the caller does not have LoggingPermission("control").public void flush()
ILogPublisherFlush any buffered output.
flush in interface ILogPublisherflush in class LogPublisherpublic void publish(LogRecord record, String formattedMsg)
publish in class LogPublisherCopyright © 2019 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All rights reserved.