public class ConsoleAdapter extends Object
OutputLoop
) to the standard output stream,
System.out
. The class starts a separate thread which reads
messages from the pipe and writes them to the logging endpoint. Message
severity is specified using a message prefix; "warning:", "status:",
"info:", or "error:". The default severity is STATUS
. For
example:
System.out.println("info:Program started.");
will log the message "Program started." as an INFO
message.
ConsoleFrame
,
OutputLoop
Modifier and Type | Field and Description |
---|---|
private LoggingEndpoint |
log |
private OutputLoop |
pipe |
private BufferedReader |
reader |
private Thread |
thread |
Constructor and Description |
---|
ConsoleAdapter(LoggingEndpoint log)
Construct a new
ConsoleAdapter for the specified logging
endpoint. |
private LoggingEndpoint log
private OutputLoop pipe
private BufferedReader reader
public ConsoleAdapter(LoggingEndpoint log) throws IOException
ConsoleAdapter
for the specified logging
endpoint.log
- The LoggingEndpoint
to use.IOException
- If the output loop could not be created.private void _run()
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses