private static class Log.LogHandler
extends java.util.logging.StreamHandler
Our own handler, includes a nice Formatter, and knows its OutputStream.
Modifier and Type | Field and Description |
---|---|
(package private) boolean |
enabled
whether this handler is enabled
|
(package private) java.util.logging.Level |
level
The log Level in use by this LogHandler.
|
(package private) java.io.OutputStream |
os
The OutputStream in use by this LogHandler.
|
Constructor and Description |
---|
Log.LogHandler(java.io.OutputStream os)
Create a new LogHandler with the specified OutputStream.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isLoggable(java.util.logging.LogRecord record) |
void |
setLevel(java.util.logging.Level level) |
void |
setStream(java.io.OutputStream os) |
close, flush, publish, setEncoding, setOutputStream
volatile java.io.OutputStream os
The OutputStream in use by this LogHandler.
volatile java.util.logging.Level level
The log Level in use by this LogHandler.
volatile boolean enabled
Log.LogHandler(java.io.OutputStream os)
Create a new LogHandler with the specified OutputStream.
os
- the OutputStream to use, not nullpublic boolean isLoggable(java.util.logging.LogRecord record)
isLoggable
in class java.util.logging.StreamHandler
public void setLevel(java.util.logging.Level level)
setLevel
in class java.util.logging.Handler
public void setStream(java.io.OutputStream os)