Package net.ssehub.easy.basics.logger
Class LogFormatter
java.lang.Object
java.util.logging.Formatter
net.ssehub.easy.basics.logger.LogFormatter
This Formatter is used by the EASyLogger to format the logging output.
- Author:
- Sass
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final SimpleDateFormatprivate static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidappendEclipseDebugLink(LogRecord record, StringBuilder sb) Appends a clickable link for the Eclipse IDE, which points to the file and line number where the Message was created.private StackTraceElementgetCallerStackFrame(String callerName) Gets the CallerStackFrame for the Class throwing the exception.Methods inherited from class java.util.logging.Formatter
formatMessage, getHead, getTail
-
Field Details
-
LINE_SEPARATOR
-
DATE_FORMAT
-
-
Constructor Details
-
LogFormatter
public LogFormatter()
-
-
Method Details
-
format
-
appendEclipseDebugLink
Appends a clickable link for the Eclipse IDE, which points to the file and line number where the Message was created. Note:- Only useful when Code was compiled with debug information
- Only useful when EASy is executed inside Eclipse
- Parameters:
record- the log record to be formatted.sb- the formatted log record (which is currently build.
-
getCallerStackFrame
Gets the CallerStackFrame for the Class throwing the exception.- Parameters:
callerName- Name of the class- Returns:
- StackTraceElement of callerName
-