net.sf.jbatchengine.batch.util
Class LogRedirectionThread

java.lang.Object
  extended by java.lang.Thread
      extended by net.sf.jbatchengine.batch.util.LogRedirectionThread
All Implemented Interfaces:
Runnable

public class LogRedirectionThread
extends Thread

Thread to catch STDOUT und STDERR of a process and redirect to Log4j

Version:
$Revision: 1.1 $, $Date: 2006/10/20 11:30:59 $
Author:
$Author: simas_ch $

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
static int ERR
           
private static org.apache.log4j.Logger log
           
static int OUT
           
private  Process proc
           
private  int usage
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
LogRedirectionThread(Process proc, int usage)
           
 
Method Summary
 void run()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

private static transient org.apache.log4j.Logger log

proc

private Process proc

usage

private int usage

OUT

public static final int OUT
See Also:
Constant Field Values

ERR

public static final int ERR
See Also:
Constant Field Values
Constructor Detail

LogRedirectionThread

public LogRedirectionThread(Process proc,
                            int usage)
Method Detail

run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class Thread