Class Log4JBasedStreamsProxy
- java.lang.Object
-
- de.uka.ipd.sdq.workflow.logging.console.Log4JBasedStreamsProxy
-
- All Implemented Interfaces:
IStreamsProxy
public class Log4JBasedStreamsProxy extends Object implements IStreamsProxy
This class is a IStreamsProxy implementation which uses Log4J appender as source of its output and error streams. IStreamsProxy is the interface used by Eclipse to redirect console outputs to a dedicated run console in its GUI. It is based on an event notification mechanismn which throws an event any time a new line should be added to the console output.
-
-
Constructor Summary
Constructors Constructor Description Log4JBasedStreamsProxy()
Constructor, create appender container for both output streams.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAppender(StreamsProxyAppender appender)
Add a new Log4J appender to this StreamsProxy.void
dispose()
Dispose.IStreamMonitor
getErrorStreamMonitor()
IStreamMonitor
getOutputStreamMonitor()
void
removeAppender(StreamsProxyAppender appender)
Removes the appender.void
write(String input)
-
-
-
Method Detail
-
getErrorStreamMonitor
public IStreamMonitor getErrorStreamMonitor()
- Specified by:
getErrorStreamMonitor
in interfaceIStreamsProxy
-
getOutputStreamMonitor
public IStreamMonitor getOutputStreamMonitor()
- Specified by:
getOutputStreamMonitor
in interfaceIStreamsProxy
-
write
public void write(String input) throws IOException
- Specified by:
write
in interfaceIStreamsProxy
- Throws:
IOException
-
addAppender
public void addAppender(StreamsProxyAppender appender)
Add a new Log4J appender to this StreamsProxy. It has to be of type StreamsProxyAppender which can be initialised and setup at will.- Parameters:
appender
- the appender
-
removeAppender
public void removeAppender(StreamsProxyAppender appender)
Removes the appender.- Parameters:
appender
- the appender
-
dispose
public void dispose()
Dispose.
-
-