public class BureauLogRedirector extends Object
Logger instance is the one for this class. The intent
is that log4j will be configured to use %t (thread name) to embed the bureau id.| Constructor and Description |
|---|
BureauLogRedirector(String bureauId,
InputStream input)
Creates a new redirector with no size limit.
|
BureauLogRedirector(String bureauId,
InputStream input,
int limit)
Creates a new redirector.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getBureauId()
Gets the bureau id this was created with.
|
int |
getLimit()
Gets the character limit associated with the log.
|
int |
getWritten()
Gets the total number of characters written to the log.
|
boolean |
isRunning()
Returns true if the redirector is still active.
|
boolean |
isTruncated()
Tests if this redirector has stopped copying lines due to the size limit being exceeded.
|
void |
reset(int limit)
Resets the redirector's truncation status and allows additional output up to the given
character limit.
|
public BureauLogRedirector(String bureauId, InputStream input)
bureauId - the id of the bureau being redirected - this will become the thread nameinput - the stream that is the output of the bureau processpublic BureauLogRedirector(String bureauId, InputStream input, int limit)
bureauId - the id of the bureau being redirected - this will become the thread nameinput - the stream that is the output of the bureau processlimit - approximate limit for the total characters written to the loggerpublic String getBureauId()
public int getWritten()
public int getLimit()
public void reset(int limit)
public boolean isTruncated()
public boolean isRunning()
Copyright © 2015. All rights reserved.