de.intarsys.tools.logging
Class FileDumpHandler
java.lang.Object
java.util.logging.Handler
de.intarsys.tools.logging.FileDumpHandler
public class FileDumpHandler
- extends Handler
A java logging Handler that checks for parameters that come along
with the log record that should be "dumped" in a directory.
Simple set up the FileDumpHandler and write code like
...
Log.log(Level.INFO, "input data", myFile);
...
This result in "myFile" content copied to the file dump directory.
This implementation supports parameters of type
| Methods inherited from class java.util.logging.Handler |
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, setEncoding, setErrorManager, setFilter, setFormatter, setLevel |
FileDumpHandler
public FileDumpHandler()
dump
public static void dump(File logDir,
Object target)
throws IOException,
FileNotFoundException
- Throws:
IOException
FileNotFoundException
close
public void close()
throws SecurityException
- Specified by:
close in class Handler
- Throws:
SecurityException
flush
public void flush()
- Specified by:
flush in class Handler
getDirectory
public File getDirectory()
publish
public void publish(LogRecord record)
- Specified by:
publish in class Handler
setDirectory
public void setDirectory(File directory)
Copyright © 2012 intarsys consulting GmbH. All Rights Reserved.