public class FileListener extends ListenerSupport
Modifier and Type | Class and Description |
---|---|
static interface |
FileListener.RollingStrategy
Interface for file rolling strategy's.
|
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_BUFFER_SIZE |
log
Constructor and Description |
---|
FileListener() |
Modifier and Type | Method and Description |
---|---|
protected CountingWriter |
createWriter() |
protected String |
evaluate(String input) |
int |
getBufferSize() |
File |
getFile() |
protected Object |
getProperty(String name) |
FileListener.RollingStrategy |
getRollingStrategy() |
CountingWriter |
getWriter() |
boolean |
isAppend() |
void |
onEvent(Event event)
Handle an event.
|
void |
setAppend(boolean append) |
void |
setBufferSize(int n) |
void |
setFile(File file) |
void |
setFile(String fileName) |
void |
setRollingStrategy(FileListener.RollingStrategy s) |
String |
toString() |
createRenderer, getRenderer, getThreshold, isLoggable, render, setRenderer, setThreshold, setThreshold
public static final int DEFAULT_BUFFER_SIZE
public File getFile()
public void setFile(File file)
public void setFile(String fileName)
public boolean isAppend()
public void setAppend(boolean append)
public int getBufferSize()
public void setBufferSize(int n)
public FileListener.RollingStrategy getRollingStrategy()
public void setRollingStrategy(FileListener.RollingStrategy s)
public CountingWriter getWriter()
protected CountingWriter createWriter() throws IOException
IOException
public void onEvent(Event event) throws Exception
Listener
event
- The event to handle.Exception
- Failed to handled event.Copyright © 2008–2018 Sonatype. All rights reserved.