Package org.apache.felix.hc.api
Class FormattingResultLog
- java.lang.Object
-
- org.apache.felix.hc.api.ResultLog
-
- org.apache.felix.hc.api.FormattingResultLog
-
- All Implemented Interfaces:
java.lang.Iterable<ResultLog.Entry>
@ProviderType public class FormattingResultLog extends ResultLog
Utility that provides a logging-like facade on a ResultLog.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.felix.hc.api.ResultLog
ResultLog.Entry
-
-
Constructor Summary
Constructors Constructor Description FormattingResultLog()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.lang.String
bytesHumanReadable(double size)
Utility method to return any magnitude of bytes in a human readable format using the appropriate unit (kB, MB, GB) depending on the magnitude of the input.void
critical(java.lang.String message, java.lang.Object... args)
void
debug(java.lang.String message, java.lang.Object... args)
void
healthCheckError(java.lang.String message, java.lang.Object... args)
void
info(java.lang.String message, java.lang.Object... args)
static java.lang.String
msHumanReadable(long millis)
Utility method to return any magnitude of milliseconds in a human readable message using the appropriate time unit (ms, sec, min) depending on the magnitude of the input.void
temporarilyUnavailable(java.lang.String message, java.lang.Object... args)
void
warn(java.lang.String message, java.lang.Object... args)
-
Methods inherited from class org.apache.felix.hc.api.ResultLog
add, getAggregateStatus, iterator, toString
-
-
-
-
Method Detail
-
debug
public void debug(java.lang.String message, java.lang.Object... args)
- Parameters:
message
- The message for the log entry (with {} placeholders as known from slf4j)args
- The args for the placeholders given in message
-
info
public void info(java.lang.String message, java.lang.Object... args)
- Parameters:
message
- The message for the log entry (with {} placeholders as known from slf4j)args
- The args for the placeholders given in message
-
warn
public void warn(java.lang.String message, java.lang.Object... args)
- Parameters:
message
- The message for the log entry (with {} placeholders as known from slf4j)args
- The args for the placeholders given in message
-
critical
public void critical(java.lang.String message, java.lang.Object... args)
- Parameters:
message
- The message for the log entry (with {} placeholders as known from slf4j)args
- The args for the placeholders given in message
-
temporarilyUnavailable
public void temporarilyUnavailable(java.lang.String message, java.lang.Object... args)
- Parameters:
message
- The message for the log entry (with {} placeholders as known from slf4j)args
- The args for the placeholders given in message
-
healthCheckError
public void healthCheckError(java.lang.String message, java.lang.Object... args)
- Parameters:
message
- The message for the log entry (with {} placeholders as known from slf4j)args
- The args for the placeholders given in message
-
msHumanReadable
public static java.lang.String msHumanReadable(long millis)
Utility method to return any magnitude of milliseconds in a human readable message using the appropriate time unit (ms, sec, min) depending on the magnitude of the input.- Parameters:
millis
- milliseconds- Returns:
- a string with a number and a unit
-
bytesHumanReadable
public static java.lang.String bytesHumanReadable(double size)
Utility method to return any magnitude of bytes in a human readable format using the appropriate unit (kB, MB, GB) depending on the magnitude of the input.- Parameters:
size
- in bytes- Returns:
- a human readable result
-
-