Class CustomFormatter
java.lang.Object
java.util.logging.Formatter
com.github.rlacher.sortbench.logging.CustomFormatter
Customises logging format based on verbosity.
-
Constructor Summary
ConstructorsConstructorDescriptionCustomFormatter(boolean verbose) Initialises the object with the specified verbose mode. -
Method Summary
Methods inherited from class java.util.logging.Formatter
formatMessage, getHead, getTail
-
Constructor Details
-
CustomFormatter
public CustomFormatter(boolean verbose) Initialises the object with the specified verbose mode.- Parameters:
verbose-truefor verbose,falsefor minimal output.
-
-
Method Details
-
format
Provides a custom logging format.- Specified by:
formatin classFormatter- Parameters:
record- TheLogRecordprovided.- Returns:
- Formatted log message (verbose or minimal).
- Throws:
IllegalArgumentException- Ifrecordisnull.
-