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:
Iterable<ResultLog.Entry>
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 -
Method Summary
Modifier and TypeMethodDescriptionstatic StringbytesHumanReadable(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.voidvoidvoidhealthCheckError(String message, Object... args) voidstatic StringmsHumanReadable(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.voidtemporarilyUnavailable(String message, Object... args) voidMethods inherited from class org.apache.felix.hc.api.ResultLog
add, getAggregateStatus, iterator, toStringMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
FormattingResultLog
public FormattingResultLog()
-
-
Method Details
-
debug
- Parameters:
message- The message for the log entry (with {} placeholders as known from slf4j)args- The args for the placeholders given in message
-
info
- Parameters:
message- The message for the log entry (with {} placeholders as known from slf4j)args- The args for the placeholders given in message
-
warn
- Parameters:
message- The message for the log entry (with {} placeholders as known from slf4j)args- The args for the placeholders given in message
-
critical
- Parameters:
message- The message for the log entry (with {} placeholders as known from slf4j)args- The args for the placeholders given in message
-
healthCheckError
- Parameters:
message- The message for the log entry (with {} placeholders as known from slf4j)args- The args for the placeholders given in message
-
msHumanReadable
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
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
-