Class ErrorLog
java.lang.Object
com.github.gbenroscience.util.ErrorLog
- All Implemented Interfaces:
Savable,Serializable
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclearLog()voidvoidvoidConvenience method for logging errors.voidLogs an exception using a clean, standard stack trace format.getLogs()voidvoidlog(ErrorLog.Level level, String message) Logs a message with a specific severity level.static voidvoidprint()Prints the contents of this log to System.print without clearing the log.voidprint(boolean flush) Prints the contents of this log to System.print.voidprint(PrintStream out, boolean flush) Prints the contents of this log to a specified PrintStream.voidConvenience method for logging warnings.
-
Constructor Details
-
ErrorLog
public ErrorLog()
-
-
Method Details
-
log
Logs a message with a specific severity level.- Parameters:
level-message-
-
info
- Parameters:
message-
-
error
-
warning
-
error
Logs an exception using a clean, standard stack trace format.- Parameters:
t-
-
getLogs
-
print
public void print()Prints the contents of this log to System.print without clearing the log. -
print
public void print(boolean flush) Prints the contents of this log to System.print.- Parameters:
flush- If true, clears the log memory after printing.
-
print
Prints the contents of this log to a specified PrintStream.- Parameters:
out- The PrintStream to output to.flush- If true, clears the log memory after printing.
-
clearLog
public void clearLog() -
copyTo
-
copyFrom
-
main
-