Interface FormatStep

All Known Implementing Classes:
CompoundFormatStep

public interface FormatStep
A single format step which handles some part of rendering a log record.
  • Field Details

    • NO_STEPS

      static final FormatStep[] NO_STEPS
      An array of no steps.
    • NULL_STEP

      static final FormatStep NULL_STEP
  • Method Details

    • createCompoundStep

      static FormatStep createCompoundStep(FormatStep... steps)
    • render

      void render(StringBuilder builder, ExtLogRecord record)
      Render a part of the log record.
      Parameters:
      builder - the string builder to append to
      record - the record being rendered
    • render

      default void render(Formatter formatter, StringBuilder builder, ExtLogRecord record)
      Render a part of the log record to the given formatter.
      Parameters:
      formatter - the formatter to render to
      builder - the string builder to append to
      record - the record being rendered
    • estimateLength

      int estimateLength()
      Emit an estimate of the length of data which this step will produce. The more accurate the estimate, the more likely the format operation will be performant.
      Returns:
      an estimate
    • isCallerInformationRequired

      default boolean isCallerInformationRequired()
      Indicates whether or not caller information is required for this format step.
      Returns:
      true if caller information is required, otherwise false
    • childSteps

      default FormatStep[] childSteps()
      Get child steps that compose this step.
      Returns:
      the child steps (not null)
    • childStepCount

      default int childStepCount()
    • getChildStep

      default FormatStep getChildStep(int idx)
    • getItemType

      default FormatStep.ItemType getItemType()
      Get the item type of this step.
      Returns:
      the item type