Interface DebugLogger

  • All Superinterfaces:
    Lvl
    All Known Implementing Classes:
    DefaultDebugLogger

    public interface DebugLogger
    extends Lvl
    An interface for logging errors, warnings, messages, and exceptions in the Mckoi system. The implementation of where the log is written (to the console, file, window, etc) is implementation defined.
    Author:
    Tobias Downer
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean isInterestedIn​(int level)
      Queries the current debug level.
      void write​(int level, java.lang.Class cla, java.lang.String message)  
      void write​(int level, java.lang.Object ob, java.lang.String message)
      This writes the given debugging string.
      void write​(int level, java.lang.String class_string, java.lang.String message)  
      void writeException​(int level, java.lang.Throwable e)
      This writes the given Exception but gives it a 'debug_level'.
      void writeException​(java.lang.Throwable e)
      This writes the given Exception.
    • Method Detail

      • isInterestedIn

        boolean isInterestedIn​(int level)
        Queries the current debug level. Returns true if the debug listener is interested in debug information of this given level. This can be used to speed up certain complex debug displaying operations where the debug listener isn't interested in the information be presented.
      • write

        void write​(int level,
                   java.lang.Object ob,
                   java.lang.String message)
        This writes the given debugging string. It filters out any messages that are below the 'debug_level' variable. The 'object' variable specifies the object that made the call. 'level' must be between 0 and 255. A message of 'level' 255 will always print.
      • write

        void write​(int level,
                   java.lang.Class cla,
                   java.lang.String message)
      • write

        void write​(int level,
                   java.lang.String class_string,
                   java.lang.String message)
      • writeException

        void writeException​(java.lang.Throwable e)
        This writes the given Exception. Exceptions are always output to the log stream.
      • writeException

        void writeException​(int level,
                            java.lang.Throwable e)
        This writes the given Exception but gives it a 'debug_level'. This is so we can write out a warning exception.