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
`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 and Description
`DefaultStreamGobblerCallback(int level)` The overloaded constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `work(java.lang.String line)` Callback whenever a line is read from the stream by the StreamGobbler.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### 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.

### Constructor Detail

#### DefaultStreamGobblerCallback

    public DefaultStreamGobblerCallback(int level)

The overloaded constructor.

Parameters:
  `level` - the level on which to log.

### 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 interface `StreamGobblerCallback`
Parameters:
  `line` - the line that is read.