Class Log4JBasedStreamsProxy
java.lang.Object
de.uka.ipd.sdq.workflow.logging.console.Log4JBasedStreamsProxy
- All Implemented Interfaces:
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
ConstructorDescriptionConstructor, create appender container for both output streams. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAppender
(StreamsProxyAppender appender) Add a new Log4J appender to this StreamsProxy.void
dispose()
Dispose.void
removeAppender
(StreamsProxyAppender appender) Removes the appender.void
-
Constructor Details
-
Log4JBasedStreamsProxy
public Log4JBasedStreamsProxy()Constructor, create appender container for both output streams.
-
-
Method Details
-
getErrorStreamMonitor
- Specified by:
getErrorStreamMonitor
in interfaceIStreamsProxy
-
getOutputStreamMonitor
- Specified by:
getOutputStreamMonitor
in interfaceIStreamsProxy
-
write
- Specified by:
write
in interfaceIStreamsProxy
- Throws:
IOException
-
addAppender
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
Removes the appender.- Parameters:
appender
- the appender
-
dispose
public void dispose()Dispose.
-