Package edu.isi.pegasus.common.util
Class DefaultStreamGobblerCallback
- java.lang.Object
-
- edu.isi.pegasus.common.util.DefaultStreamGobblerCallback
-
- All Implemented Interfaces:
StreamGobblerCallback
public class DefaultStreamGobblerCallback extends java.lang.Object implements StreamGobblerCallback
The default callback for the stream gobbler, that logs all the messages to a particular logging level. By default all the messages are logged onto the DEBUG level.- Version:
- $Revision$
- Author:
- Karan Vahi
-
-
Field Summary
Fields Modifier and Type Field Description private int
mLevel
The level on which the messages are to be logged.private LogManager
mLogger
The instance to the logger to log messages.
-
Constructor Summary
Constructors Constructor Description DefaultStreamGobblerCallback(int level)
The overloaded constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
work(java.lang.String line)
Callback whenever a line is read from the stream by the StreamGobbler.
-
-
-
Field Detail
-
mLevel
private int mLevel
The level on which the messages are to be logged.
-
mLogger
private LogManager mLogger
The instance to the logger to log messages.
-
-
Method Detail
-
work
public void work(java.lang.String line)
Callback whenever a line is read from the stream by the StreamGobbler. The line is logged to the level specified while initializing the class.- Specified by:
work
in interfaceStreamGobblerCallback
- Parameters:
line
- the line that is read.
-
-