public class LoggingStreamSlurper
extends java.lang.Thread
Thread that reads an input stream and writes its lines to a logger. All lines are written at the info level.
Constructor and Description |
---|
LoggingStreamSlurper(java.lang.String name,
java.io.InputStream stream,
org.slf4j.Logger log,
java.lang.String pfx)
Create a new stream slurper.
|
Modifier and Type | Method and Description |
---|---|
void |
run() |
activeCount, checkAccess, clone, 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
public LoggingStreamSlurper(java.lang.String name, java.io.InputStream stream, org.slf4j.Logger log, java.lang.String pfx)
Create a new stream slurper.
name
- The thread name.stream
- The input stream.log
- The logger.pfx
- A prefix to prepend to log messages.