@Public
@Unstable
public final class IOStatisticsLogging
extends java.lang.Object
| Modifier and Type | Method | Description |
|---|---|---|
static java.lang.Object |
demandStringifyIOStatistics(IOStatistics statistics) |
On demand stringifier of an IOStatistics instance.
|
static java.lang.Object |
demandStringifyIOStatisticsSource(IOStatisticsSource source) |
On demand stringifier of an IOStatisticsSource instance.
|
static java.lang.String |
ioStatisticsSourceToString(java.lang.Object source) |
Extract the statistics from a source object -or ""
if it is not an instance of
IOStatistics,
IOStatisticsSource or the retrieved
statistics are null. |
static java.lang.String |
ioStatisticsToPrettyString(IOStatistics statistics) |
Convert IOStatistics to a string form, with all the metrics sorted
and empty value stripped.
|
static java.lang.String |
ioStatisticsToString(IOStatistics statistics) |
Convert IOStatistics to a string form.
|
static void |
logIOStatisticsAtDebug(java.lang.String message,
java.lang.Object source) |
Extract any statistics from the source and log to
this class's log at debug, if
the log is set to log at debug.
|
static void |
logIOStatisticsAtDebug(org.slf4j.Logger log,
java.lang.String message,
java.lang.Object source) |
Extract any statistics from the source and log at debug, if
the log is set to log at debug.
|
static void |
logIOStatisticsAtLevel(org.slf4j.Logger log,
java.lang.String level,
java.lang.Object source) |
A method to log IOStatistics from a source at different levels.
|
public static java.lang.String ioStatisticsSourceToString(@Nullable
java.lang.Object source)
IOStatistics,
IOStatisticsSource or the retrieved
statistics are null.
Exceptions are caught and downgraded to debug logging.
source - source of statistics.public static java.lang.String ioStatisticsToString(@Nullable
IOStatistics statistics)
statistics - A statistics instance.public static java.lang.String ioStatisticsToPrettyString(@Nullable
IOStatistics statistics)
statistics - A statistics instance.public static java.lang.Object demandStringifyIOStatisticsSource(@Nullable
IOStatisticsSource source)
Whenever this object's toString() method is called, it evaluates the statistics.
This is designed to affordable to use in log statements.
source - source of statistics -may be null.public static java.lang.Object demandStringifyIOStatistics(@Nullable
IOStatistics statistics)
Whenever this object's toString() method is called, it evaluates the statistics.
This is for use in log statements where for the cost of creation of this entry is low; it is affordable to use in log statements.
statistics - statistics to stringify -may be null.public static void logIOStatisticsAtDebug(org.slf4j.Logger log,
java.lang.String message,
java.lang.Object source)
log - log to log tomessage - message for log -this must contain "{}" for the
statistics report to actually get logged.source - source objectpublic static void logIOStatisticsAtDebug(java.lang.String message,
java.lang.Object source)
message - message for log -this must contain "{}" for the
statistics report to actually get logged.source - source objectpublic static void logIOStatisticsAtLevel(org.slf4j.Logger log,
java.lang.String level,
java.lang.Object source)
log - Logger for logging.level - LOG level.source - Source to LOG.Copyright © 2008–2025 Apache Software Foundation. All rights reserved.