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 Classes
    Modifier and Type
    Interface
    Description
    static final class 
    Builds a LogReporter.
    static interface 
    Implemented by a component that wants to contribute its own description to a report instead of falling back to just its class name.
    static enum 
    A section of the report that can be independently turned on or off.
  • Method Summary

    Modifier and Type
    Method
    Description
    Creates a builder.
    default String
    Renders the report as a String.
    void
    report(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 a Writer/response even while the system is in a degraded state.
    default void
    Writes the report to a StringBuilder, which never actually throws IOException in practice, so callers do not need to handle one.
  • Method Details

    • report

      void report(RainbowGum gum, Appendable appendable) throws IOException
      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 a Writer/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

      default void report(RainbowGum gum, StringBuilder sb)
      Writes the report to a StringBuilder, which never actually throws IOException in practice, so callers do not need to handle one.
      Parameters:
      gum - bound RainbowGum instance to report on.
      sb - destination.
    • report

      default String report(RainbowGum gum)
      Renders the report as a String.
      Parameters:
      gum - bound RainbowGum instance to report on.
      Returns:
      report.
    • builder

      Creates a builder.
      Returns:
      builder.