Package aQute.libg.reporter.slf4j
Class Slf4jReporter
- java.lang.Object
-
- aQute.libg.reporter.ReporterAdapter
-
- aQute.libg.reporter.slf4j.Slf4jReporter
-
public class Slf4jReporter extends ReporterAdapter
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface aQute.service.reporter.Report
Report.Location
-
Nested classes/interfaces inherited from interface aQute.service.reporter.Reporter
Reporter.SetLocation
-
-
Constructor Summary
Constructors Constructor Description Slf4jReporter()
Slf4jReporter(java.lang.Class<?> loggingClass)
Slf4jReporter(org.slf4j.Logger logger)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Reporter.SetLocation
error(java.lang.String format, java.lang.Object... args)
Create an error.Reporter.SetLocation
exception(java.lang.Throwable t, java.lang.String format, java.lang.Object... args)
Dedicated message for an exception.static Reporter
getAlternative(java.lang.Class<?> class1, Reporter reporter)
void
progress(float progress, java.lang.String format, java.lang.Object... args)
Deprecated.Use SLF4J Logger.info() instead.void
trace(java.lang.String format, java.lang.Object... args)
Create a warning.Reporter.SetLocation
warning(java.lang.String format, java.lang.Object... args)
Create a warning.-
Methods inherited from class aQute.libg.reporter.ReporterAdapter
addErrors, addWarnings, check, getErrors, getInfo, getInfo, getLocation, getMessages, getOut, getWarnings, isExceptions, isOk, isPedantic, isPerfect, isTrace, report, run, setExceptions, setPedantic, setTrace
-
-
-
-
Method Detail
-
error
public Reporter.SetLocation error(java.lang.String format, java.lang.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 interfaceReporter
- Overrides:
error
in classReporterAdapter
- Parameters:
format
- The format of the errorargs
- The arguments of the error- Returns:
- a SetLocation to set the location
-
warning
public Reporter.SetLocation warning(java.lang.String format, java.lang.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 interfaceReporter
- Overrides:
warning
in classReporterAdapter
- Parameters:
format
- The format of the errorargs
- The arguments of the error- Returns:
- a SetLocation to set the location
-
trace
public void trace(java.lang.String format, java.lang.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 interfaceReporter
- Overrides:
trace
in classReporterAdapter
- Parameters:
format
- The format of the errorargs
- The arguments of the error
-
progress
@Deprecated public void progress(float progress, java.lang.String format, java.lang.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 interfaceReporter
- Overrides:
progress
in classReporterAdapter
- Parameters:
progress
- A value between 0 and 1 indicating the progress. 0 is starting and >=1 is done.format
- The format of the errorargs
- The arguments of the error
-
exception
public Reporter.SetLocation exception(java.lang.Throwable t, java.lang.String format, java.lang.Object... args)
Description copied from interface:Reporter
Dedicated message for an exception.- Specified by:
exception
in interfaceReporter
- Overrides:
exception
in classReporterAdapter
- Parameters:
t
- The exceptionformat
- The format of the messageargs
- The arguments
-
-