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 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
void
void
healthCheckError
(String message, Object... args) void
static 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
(String message, Object... args) void
Methods inherited from class org.apache.felix.hc.api.ResultLog
add, getAggregateStatus, iterator, toString
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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
-