Class Slf4jReporter

java.lang.Object
aQute.libg.reporter.ReporterAdapter
aQute.libg.reporter.slf4j.Slf4jReporter
All Implemented Interfaces:
Report, Reporter, Runnable

public class Slf4jReporter extends ReporterAdapter
  • Field Details

    • logger

      private final org.slf4j.Logger logger
  • Constructor Details

    • Slf4jReporter

      public Slf4jReporter(Class<?> loggingClass)
    • Slf4jReporter

      public Slf4jReporter()
    • Slf4jReporter

      public Slf4jReporter(org.slf4j.Logger logger)
  • Method Details

    • error

      public Reporter.SetLocation error(String format, Object... args)
      Description copied from interface: Reporter
      Create an error. Implementations must ensure that the given args are not prevented from garbage collecting. The args must have a proper toString method.
      Specified by:
      error in interface Reporter
      Overrides:
      error in class ReporterAdapter
      Parameters:
      format - The format of the error
      args - The arguments of the error
      Returns:
      a SetLocation to set the location
    • warning

      public Reporter.SetLocation warning(String format, Object... args)
      Description copied from interface: Reporter
      Create a warning. Implementations must ensure that the given args are not prevented from garbage collecting. The args must have a proper toString method.
      Specified by:
      warning in interface Reporter
      Overrides:
      warning in class ReporterAdapter
      Parameters:
      format - The format of the error
      args - The arguments of the error
      Returns:
      a SetLocation to set the location
    • trace

      public void trace(String format, Object... args)
      Description copied from interface: Reporter
      Create a warning. Implementations must ensure that the given args are not prevented from garbage collecting. The args must have a proper toString method.
      Specified by:
      trace in interface Reporter
      Overrides:
      trace in class ReporterAdapter
      Parameters:
      format - The format of the error
      args - The arguments of the error
    • progress

      @Deprecated public void progress(float progress, String format, Object... args)
      Deprecated.
      Use SLF4J Logger.info() instead.
      Description copied from interface: Reporter
      Create a warning. Implementations must ensure that the given args are not prevented from garbage collecting. The args must have a proper toString method.
      Specified by:
      progress in interface Reporter
      Overrides:
      progress in class ReporterAdapter
      Parameters:
      progress - A value between 0 and 1 indicating the progress. 0 is starting and >=1 is done.
      format - The format of the error
      args - The arguments of the error
    • exception

      public Reporter.SetLocation exception(Throwable t, String format, Object... args)
      Description copied from interface: Reporter
      Dedicated message for an exception.
      Specified by:
      exception in interface Reporter
      Overrides:
      exception in class ReporterAdapter
      Parameters:
      t - The exception
      format - The format of the message
      args - The arguments
    • getAlternative

      public static Reporter getAlternative(Class<?> class1, Reporter reporter)