Package com.glitchybyte.glib.log
Class GStandardLogFormatter
java.lang.Object
java.util.logging.Formatter
java.util.logging.SimpleFormatter
com.glitchybyte.glib.log.GLogFormatter
com.glitchybyte.glib.log.GStandardLogFormatter
Standard log formatter class.
Uses a compact time format and shows thread name. Made to log one-liners (except for exceptions).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidapplyClassName(StringBuilder sb, String value) Applies theclassNamevalue to the log being built by the givenStringBuilder.protected voidapplyDateTime(StringBuilder sb, String value) Applies thedatetimevalue to the log being built by the givenStringBuilder.protected voidapplyLevel(StringBuilder sb, String value) Applies thelevelvalue to the log being built by the givenStringBuilder.protected voidapplyMessage(StringBuilder sb, String value) Applies themessagevalue to the log being built by the givenStringBuilder.protected voidapplyThreadName(StringBuilder sb, String value) Applies thethreadNamevalue to the log being built by the givenStringBuilder.protected voidapplyThrowableMessage(StringBuilder sb, String value) Applies thethrowableMessagevalue to the log being built by the givenStringBuilder.protected voidapplyThrowableTraceLine(StringBuilder sb, String value) Applies thethrowableTraceLinevalue to the log being built by the givenStringBuilder.Methods inherited from class com.glitchybyte.glib.log.GLogFormatter
formatMethods inherited from class java.util.logging.Formatter
formatMessage, getHead, getTail
-
Constructor Details
-
GStandardLogFormatter
public GStandardLogFormatter()Creates a standard log formatter.
-
-
Method Details
-
applyDateTime
Description copied from class:GLogFormatterApplies thedatetimevalue to the log being built by the givenStringBuilder.- Specified by:
applyDateTimein classGLogFormatter- Parameters:
sb- Log message builder.value- Value to apply.
-
applyLevel
Description copied from class:GLogFormatterApplies thelevelvalue to the log being built by the givenStringBuilder.- Specified by:
applyLevelin classGLogFormatter- Parameters:
sb- Log message builder.value- Value to apply.
-
applyThreadName
Description copied from class:GLogFormatterApplies thethreadNamevalue to the log being built by the givenStringBuilder.- Specified by:
applyThreadNamein classGLogFormatter- Parameters:
sb- Log message builder.value- Value to apply.
-
applyClassName
Description copied from class:GLogFormatterApplies theclassNamevalue to the log being built by the givenStringBuilder.- Specified by:
applyClassNamein classGLogFormatter- Parameters:
sb- Log message builder.value- Value to apply.
-
applyMessage
Description copied from class:GLogFormatterApplies themessagevalue to the log being built by the givenStringBuilder.- Specified by:
applyMessagein classGLogFormatter- Parameters:
sb- Log message builder.value- Value to apply.
-
applyThrowableMessage
Description copied from class:GLogFormatterApplies thethrowableMessagevalue to the log being built by the givenStringBuilder.- Specified by:
applyThrowableMessagein classGLogFormatter- Parameters:
sb- Log message builder.value- Value to apply.
-
applyThrowableTraceLine
Description copied from class:GLogFormatterApplies thethrowableTraceLinevalue to the log being built by the givenStringBuilder.- Specified by:
applyThrowableTraceLinein classGLogFormatter- Parameters:
sb- Log message builder.value- Value to apply.
-