Interface ILogger

  • All Known Subinterfaces:
    IReaderLogger
    All Known Implementing Classes:
    NullLogger, StdLogger

    public interface ILogger
    Interface used to display warnings/errors while parsing the SDK content.

    There are a few default implementations available:

    • NullLogger is an implementation that does nothing with the log. Useful for limited cases where you need to call a class that requires a non-null logging yet the calling code does not have any mean of reporting logs itself. It can be acceptable for use as a temporary implementation but most of the time that means the caller code needs to be reworked to take a logger object from its own caller.
    • StdLogger is an implementation that dumps the log to System.out or System.err. This is useful for unit tests or code that does not have any GUI. GUI based apps based should not use it and should provide a better way to report to the user.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void error​(java.lang.Throwable t, java.lang.String msgFormat, java.lang.Object... args)
      Prints an error message.
      void info​(java.lang.String msgFormat, java.lang.Object... args)
      Prints an information message.
      void verbose​(java.lang.String msgFormat, java.lang.Object... args)
      Prints a verbose message.
      void warning​(java.lang.String msgFormat, java.lang.Object... args)
      Prints a warning message.
    • Method Detail

      • error

        void error​(@Nullable
                   java.lang.Throwable t,
                   @Nullable
                   java.lang.String msgFormat,
                   java.lang.Object... args)
        Prints an error message.
        Parameters:
        t - is an optional Throwable or Exception. If non-null, its message will be printed out.
        msgFormat - is an optional error format. If non-null, it will be printed using a Formatter with the provided arguments.
        args - provides the arguments for errorFormat.
      • warning

        void warning​(@NonNull
                     java.lang.String msgFormat,
                     java.lang.Object... args)
        Prints a warning message.
        Parameters:
        msgFormat - is a string format to be used with a Formatter. Cannot be null.
        args - provides the arguments for warningFormat.
      • info

        void info​(@NonNull
                  java.lang.String msgFormat,
                  java.lang.Object... args)
        Prints an information message.
        Parameters:
        msgFormat - is a string format to be used with a Formatter. Cannot be null.
        args - provides the arguments for msgFormat.
      • verbose

        void verbose​(@NonNull
                     java.lang.String msgFormat,
                     java.lang.Object... args)
        Prints a verbose message.
        Parameters:
        msgFormat - is a string format to be used with a Formatter. Cannot be null.
        args - provides the arguments for msgFormat.