net.sourceforge.groboutils.codecoverage.v2.logger
Class FileSingleSourceLoggerFactory
java.lang.Object
net.sourceforge.groboutils.codecoverage.v2.logger.AbstractSingleSourceLoggerFactory
net.sourceforge.groboutils.codecoverage.v2.logger.FileSingleSourceLoggerFactory
- All Implemented Interfaces:
- IChannelLoggerFactory, ISingleSource, java.lang.Runnable
- public class FileSingleSourceLoggerFactory
- extends AbstractSingleSourceLoggerFactory
Output the shared marks to a file.
Since this outputs to a single file, this has a potential issue
when multiple loggers are trying to access the same file. This
could happen if the CoverageLogger class is loaded by different class
loaders; as a result, multiple CoverageLogger instances will be created,
allowing for multiple channel loggers to write to the same area.
We resolve this issue by adding a pseudo-random value to the end of
the file name.
- Since:
- April 16, 2004
- Version:
- $Date: 2004/07/07 09:39:10 $
- Author:
- Matt Albrecht groboclown@users.sourceforge.net
Method Summary |
protected void |
setupProps(java.lang.String prefix,
java.util.Properties props)
Extend this method to setup your own properties. |
protected java.io.Writer |
setupSource()
Setup the source writer. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DIRECTORY_PROPERTY
public static final java.lang.String DIRECTORY_PROPERTY
- See Also:
- Constant Field Values
FILENAME_PROPERTY
public static final java.lang.String FILENAME_PROPERTY
- See Also:
- Constant Field Values
FileSingleSourceLoggerFactory
public FileSingleSourceLoggerFactory()
setupSource
protected java.io.Writer setupSource()
- Setup the source writer. This can return null. Its
actions will be synchronized for you.
- Specified by:
setupSource
in class AbstractSingleSourceLoggerFactory
setupProps
protected void setupProps(java.lang.String prefix,
java.util.Properties props)
- Extend this method to setup your own properties. Be sure to
call the super's setupProps, though. Be sure to keep the
properties around for how to connect to the source.
- Overrides:
setupProps
in class AbstractSingleSourceLoggerFactory
Copyright © 2001-2003 by The GroboUtils Project