Package org.moeaframework.util.io
Class OutputHandler
java.lang.Object
java.util.logging.Handler
java.util.logging.StreamHandler
org.moeaframework.util.io.OutputHandler
Java Logging
Handler
with some more sensible defaults (in my opinion), including (1) sending logs to
System.out
instead of System.err
, and (2) using a shorter, single line format.-
Constructor Summary
-
Method Summary
Methods inherited from class java.util.logging.StreamHandler
flush, isLoggable, setEncoding, setOutputStream
Methods inherited from class java.util.logging.Handler
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, reportError, setErrorManager, setFilter, setFormatter, setLevel
-
Constructor Details
-
OutputHandler
public OutputHandler()Constructs a new output logger.
-
-
Method Details
-
updateConfiguration
public static void updateConfiguration(boolean force) Updates Java's logging configuration with our defaults.- Parameters:
force
- overwrite any existing settings
-
getLogger
Returns the logger with the given name.- Parameters:
name
- the name of the logger- Returns:
- the logger
-
publish
- Overrides:
publish
in classStreamHandler
-
close
public void close()- Overrides:
close
in classStreamHandler
-