Class ErrorLog

java.lang.Object
com.github.gbenroscience.util.ErrorLog
All Implemented Interfaces:
Savable, Serializable

public class ErrorLog extends Object implements Savable
A utility class that tracks errors and warnings during parsing operations.
Author:
JIBOYE Oluwagbemiro Olaoluwa
See Also:
  • Constructor Details

    • ErrorLog

      public ErrorLog()
  • Method Details

    • log

      public void log(ErrorLog.Level level, String message)
      Logs a message with a specific severity level.
      Parameters:
      level -
      message -
    • info

      public void info(String message)
      Parameters:
      message -
    • error

      public void error(String message)
      Convenience method for logging errors.
      Parameters:
      message -
    • warning

      public void warning(String message)
      Convenience method for logging warnings.
      Parameters:
      message -
    • error

      public void error(Throwable t)
      Logs an exception using a clean, standard stack trace format.
      Parameters:
      t -
    • getLogs

      public String 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

      public void print(PrintStream out, boolean flush)
      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

      public void copyTo(ErrorLog log)
    • copyFrom

      public void copyFrom(ErrorLog log)
    • main

      public static void main(String[] args)