public class StreamMsgLogger extends java.lang.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(java.io.OutputStream outstr,
java.io.OutputStream errstr,
int lw)
Constructs a StreamMsgLogger that uses 'outstr' as the 'out' stream,
and 'errstr' as the 'err' stream.
|
StreamMsgLogger(java.io.PrintWriter outstr,
java.io.PrintWriter errstr,
int lw)
Constructs a StreamMsgLogger that uses 'outstr' as the 'out' stream,
and 'errstr' as the 'err' stream.
|
StreamMsgLogger(java.io.Writer outstr,
java.io.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(java.lang.String str,
int flind,
int ind)
Prints the string 'str' to the 'out' stream, appending a newline.
|
void |
printmsg(int sev,
java.lang.String msg)
Prints the message 'msg' to the output device, appending a newline,
with severity 'sev'.
|
public StreamMsgLogger(java.io.OutputStream outstr, java.io.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(java.io.Writer outstr, java.io.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(java.io.PrintWriter outstr, java.io.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, java.lang.String msg)
public void println(java.lang.String str, int flind, int ind)
Copyright © 2014 Open Microscopy Environment