Interface LogReporter
public sealed interface LogReporter
Renders a diagnostic report of a bound
RainbowGum: which sections are included
(LogReporter.Section.VERSION, LogReporter.Section.COMPONENTS, LogReporter.Section.METRICS,
LogReporter.Section.ALERTS) depends on how the LogReporter.Builder that created this reporter
was configured.- API Note
- The rendered output's format carries no compatibility guarantee whatsoever. It is meant to be read by a human, or an agent, while setting things up or debugging an incident, not parsed by anything expecting a stable schema, and may change between any two releases including patch releases.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classBuilds aLogReporter.static interfaceImplemented by a component that wants to contribute its own description to a report instead of falling back to just its class name.static enumA section of the report that can be independently turned on or off. -
Method Summary
Modifier and TypeMethodDescriptionstatic LogReporter.Builderbuilder()Creates a builder.default Stringreport(RainbowGum gum) Renders the report as a String.voidreport(RainbowGum gum, Appendable appendable) Writes the report for the given RainbowGum directly to the given appendable, rather than building the whole report in memory first, so a caller can stream straight into aWriter/response even while the system is in a degraded state.default voidreport(RainbowGum gum, StringBuilder sb) Writes the report to aStringBuilder, which never actually throwsIOExceptionin practice, so callers do not need to handle one.
-
Method Details
-
report
Writes the report for the given RainbowGum directly to the given appendable, rather than building the whole report in memory first, so a caller can stream straight into aWriter/response even while the system is in a degraded state.- Parameters:
gum- bound RainbowGum instance to report on.appendable- destination.- Throws:
IOException- if the appendable throws.
-
report
Writes the report to aStringBuilder, which never actually throwsIOExceptionin practice, so callers do not need to handle one.- Parameters:
gum- bound RainbowGum instance to report on.sb- destination.
-
report
Renders the report as a String.- Parameters:
gum- bound RainbowGum instance to report on.- Returns:
- report.
-
builder
-