|
Rice Pastry API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.io.OutputStream
rice.environment.logging.LogOutputStream
This class constructs an output stream that will send its output to a logger, line by line. This could for example be wrapped in a PrintStream to capture stdout or stderr to the log. As so: System.setOut(new PrintStream(new LogOutputStream(environment, Logger.INFO, "out"), true)); System.setErr(new PrintStream(new LogOutputStream(environment, Logger.INFO, "err"), true));
| Field Summary | |
protected byte[] |
buffer
DESCRIBE THE FIELD |
static int |
BUFFER_SIZE
DESCRIBE THE FIELD |
protected int |
level
DESCRIBE THE FIELD |
protected Logger |
logger
DESCRIBE THE FIELD |
protected int |
offset
DESCRIBE THE FIELD |
| Constructor Summary | |
LogOutputStream(Environment env,
int level)
Constructs a LogOutputStream |
|
LogOutputStream(Environment env,
int level,
java.lang.String instance)
Constructs a LogOutputStream |
|
| Method Summary | |
void |
close()
DESCRIBE THE METHOD |
void |
flush()
DESCRIBE THE METHOD |
void |
write(int b)
DESCRIBE THE METHOD |
| Methods inherited from class java.io.OutputStream |
write, write |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected Logger logger
protected byte[] buffer
protected int offset
protected int level
public static final int BUFFER_SIZE
| Constructor Detail |
public LogOutputStream(Environment env,
int level)
env - - the environment to log tolevel - - the log level of this OutputStream's messages
public LogOutputStream(Environment env,
int level,
java.lang.String instance)
env - - the environment to log tolevel - - the log level of this OutputStream's messagesinstance - - an instance name string for disambiguation| Method Detail |
public void write(int b)
throws java.io.IOException
b - DESCRIBE THE PARAMETER
java.io.IOException - DESCRIBE THE EXCEPTIONpublic void flush()
public void close()
|
Rice Pastry API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||