java.lang.Object
de.uni_hildesheim.sse.easy.loader.framework.LoaderLog

public class LoaderLog extends Object
A simple Logger class that is supposed to log the generator.
Author:
pastuschek
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static Writer
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    Closes the LoaderLog and its log file.
    static void
    error(String text)
    Writes an error into the log file.
    static void
    error(String text, Exception cause)
    Writes an error into the log file.
    static void
    info(String text)
    Writes an information text.
    static void
    init(String path)
    Sets up the LoaderLogger.
    static void
    Writes a (more complex) line separator into the log file.
    private static void
    Reports an exception.
    static void
    Writes a line separator into the log file.
    static void
    Writes a line of stars.
    static void
    warn(String text)
    Writes a warning into the log file.
    static void
    warn(String text, Exception error)
    Writes a warning into the log file.
    static void
    Writes a line into the log file.
    static void
    writeLn(String text, int indent)
    Writes a line into the log file, can add an indent.
    static void
    writeLn(Throwable throwable)
    Prints a throwable.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • writer

      private static Writer writer
  • Constructor Details

    • LoaderLog

      public LoaderLog()
  • Method Details

    • init

      public static void init(String path)
      Sets up the LoaderLogger.
      Parameters:
      path - Target for the log file.
    • writeLn

      public static void writeLn(String text)
      Writes a line into the log file.
      Parameters:
      text - The text for the log.
    • warn

      public static void warn(String text)
      Writes a warning into the log file.
      Parameters:
      text - Text along the error.
    • info

      public static void info(String text)
      Writes an information text.
      Parameters:
      text - the text
    • writeLn

      public static void writeLn(Throwable throwable)
      Prints a throwable.
      Parameters:
      throwable - the throwable
    • warn

      public static void warn(String text, Exception error)
      Writes a warning into the log file.
      Parameters:
      text - Text along the error.
      error - The exception that caused the error.
    • error

      public static void error(String text)
      Writes an error into the log file.
      Parameters:
      text - Text along the error.
    • error

      public static void error(String text, Exception cause)
      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

      public static void writeLn(String text, int indent)
      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

      private static void reportException(Exception ex)
      Reports an exception.
      Parameters:
      ex - the exception