public class StreamMsgLogger extends Object implements MsgLogger
Messages are printed to the 'err' stream if they are of severity WARNING or ERROR, otherwise they are printed to the 'out' stream. Simple strings are always printed the 'out' stream.
Constructor and Description |
---|
StreamMsgLogger(OutputStream outstr,
OutputStream errstr,
int lw)
Constructs a StreamMsgLogger that uses 'outstr' as the 'out' stream,
and 'errstr' as the 'err' stream.
|
StreamMsgLogger(PrintWriter outstr,
PrintWriter errstr,
int lw)
Constructs a StreamMsgLogger that uses 'outstr' as the 'out' stream,
and 'errstr' as the 'err' stream.
|
StreamMsgLogger(Writer outstr,
Writer errstr,
int lw)
Constructs a StreamMsgLogger that uses 'outstr' as the 'out' stream,
and 'errstr' as the 'err' stream.
|
Modifier and Type | Method and Description |
---|---|
void |
flush()
Writes any buffered data from the print() and println() methods to the
device.
|
void |
println(String str,
int flind,
int ind)
Prints the string 'str' to the 'out' stream, appending a newline.
|
void |
printmsg(int sev,
String msg)
Prints the message 'msg' to the output device, appending a newline,
with severity 'sev'.
|
public StreamMsgLogger(OutputStream outstr, OutputStream errstr, int lw)
outstr
- Where to print simple strings and LOG and INFO messages.errstr
- Where to print WARNING and ERROR messageslw
- The line width to use in formattingpublic StreamMsgLogger(Writer outstr, Writer errstr, int lw)
outstr
- Where to print simple strings and LOG and INFO messages.errstr
- Where to print WARNING and ERROR messageslw
- The line width to use in formattingpublic StreamMsgLogger(PrintWriter outstr, PrintWriter errstr, int lw)
outstr
- Where to print simple strings and LOG and INFO messages.errstr
- Where to print WARNING and ERROR messageslw
- The line width to use in formattingpublic void printmsg(int sev, String msg)
public void println(String str, int flind, int ind)
Copyright © 2014 Open Microscopy Environment