Package edu.hm.hafner.analysis
Class FilteredLog
- java.lang.Object
-
- edu.hm.hafner.analysis.FilteredLog
-
-
Constructor Summary
Constructors Constructor Description FilteredLog(Report report, String title)Creates a newFilteredLogfor aReport.FilteredLog(Report report, String title, int maxLines)Creates a newFilteredLogfor aReport.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidlogError(String format, Object... args)Logs the specified error message.voidlogException(Exception exception, String format, Object... args)Logs the specified exception.voidlogInfo(String format, Object... args)Logs the specified information message.voidlogSummary()Writes a summary message to the reports' error log that denotes the total number of errors that have been reported.intsize()Returns the total number of errors that have been reported.
-
-
-
Constructor Detail
-
FilteredLog
public FilteredLog(Report report, String title)
- Parameters:
report- the report to filter the error logtitle- the title of the error messages
-
FilteredLog
public FilteredLog(Report report, String title, int maxLines)
Creates a newFilteredLogfor aReport.- Parameters:
report- the report to filter the error logtitle- the title of the error messagesmaxLines- the maximum number of lines to log
-
-
Method Detail
-
logInfo
@FormatMethod public void logInfo(String format, Object... args)
Logs the specified information message. Use this method to log any useful information when composing this log.- Parameters:
format- A format stringargs- Arguments referenced by the format specifiers in the format string. If there are more arguments than format specifiers, the extra arguments are ignored. The number of arguments is variable and may be zero.
-
logError
@FormatMethod public void logError(String format, Object... args)
Logs the specified error message. Use this method to log any error when composing this log.- Parameters:
format- A format stringargs- Arguments referenced by the format specifiers in the format string. If there are more arguments than format specifiers, the extra arguments are ignored. The number of arguments is variable and may be zero.
-
logException
@FormatMethod public void logException(Exception exception, String format, Object... args)
Logs the specified exception. Use this method to log any exception when composing this log.- Parameters:
exception- the exception to logformat- A format stringargs- Arguments referenced by the format specifiers in the format string. If there are more arguments than format specifiers, the extra arguments are ignored. The number of arguments is variable and may be zero.
-
size
public int size()
Returns the total number of errors that have been reported.- Returns:
- the total number of errors
-
logSummary
public void logSummary()
Writes a summary message to the reports' error log that denotes the total number of errors that have been reported.
-
-