Class LoaderLog
java.lang.Object
de.uni_hildesheim.sse.easy.loader.framework.LoaderLog
A simple Logger class that is supposed to log the generator.
- Author:
- pastuschek
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidclose()Closes the LoaderLog and its log file.static voidWrites an error into the log file.static voidWrites an error into the log file.static voidWrites an information text.static voidSets up the LoaderLogger.static voidline()Writes a (more complex) line separator into the log file.private static voidReports an exception.static voidskipLine()Writes a line separator into the log file.static voidstars()Writes a line of stars.static voidWrites a warning into the log file.static voidWrites a warning into the log file.static voidWrites a line into the log file.static voidWrites a line into the log file, can add an indent.static voidPrints a throwable.
-
Field Details
-
writer
-
-
Constructor Details
-
LoaderLog
public LoaderLog()
-
-
Method Details
-
init
Sets up the LoaderLogger.- Parameters:
path- Target for the log file.
-
writeLn
Writes a line into the log file.- Parameters:
text- The text for the log.
-
warn
Writes a warning into the log file.- Parameters:
text- Text along the error.
-
info
Writes an information text.- Parameters:
text- the text
-
writeLn
Prints a throwable.- Parameters:
throwable- the throwable
-
warn
Writes a warning into the log file.- Parameters:
text- Text along the error.error- The exception that caused the error.
-
error
Writes an error into the log file.- Parameters:
text- Text along the error.
-
error
Writes an error into the log file.- Parameters:
text- Text along the error.cause- The exception that caused the error.
-
stars
public static void stars()Writes a line of stars. -
writeLn
Writes a line into the log file, can add an indent.- Parameters:
text- The text for the log.indent- The indent depth (steps of 4 are recommended).
-
close
public static void close()Closes the LoaderLog and its log file. Has to be called for the file to be actually written. -
skipLine
public static void skipLine()Writes a line separator into the log file. -
line
public static void line()Writes a (more complex) line separator into the log file. Use this to create visual lines in the log. -
reportException
Reports an exception.- Parameters:
ex- the exception
-