Interface LogRenderer<T>

Type Parameters:
T - the concrete type rendered by this strategy
All Known Implementing Classes:
AuditLogEventJsonLogRenderer, ByteArrayMarkdownLogRenderer, ContextMarkdownRenderer, ElementMarkdownLogRenderer, LicenseTxtLogRenderer, LogEventJsonLogRenderer, LogEventMarkdownRenderer, LogEventXmlLogRenderer, LoggeableJsonLogRenderer, LoggeableMarkdownLogRenderer, LoggeableXmlLogRenderer, ObjectMarkdownLogRenderer, ObjectTxtLogRenderer, ProfilerMarkdownRenderer, StringMarkdownLogRenderer, SysInfoMarkdownRenderer, SysInfoTxtLogRenderer, ThrowableMarkdownLogRenderer, TransactionManagerTraceArrayMarkdownLogRenderer, TransactionManagerTraceMarkdownLogRenderer

public interface LogRenderer<T>
Strategy that renders an object of type T into a target log format (XML, JSON, plain text, or Markdown).
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
    Supported log output format types.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the class this renderer handles.
    default String
    indent(String indent, String s)
    Prepends indent to each line of s.
    default String
    render(T obj)
    Renders the given object to a string with no indentation.
    default void
    render(T obj, PrintStream ps)
    Renders the given object to the print stream with no indentation.
    void
    render(T obj, PrintStream ps, String indent)
    Renders the given object to the print stream with the specified indentation.
    default String
    render(T obj, String indent)
    Renders the given object to a string with the specified indentation.
    Returns the log event type this renderer handles.
  • Method Details

    • render

      void render(T obj, PrintStream ps, String indent)
      Renders the given object to the print stream with the specified indentation.
      Parameters:
      obj - the object to render
      ps - the output stream
      indent - indentation prefix
    • clazz

      Class<?> clazz()
      Returns the class this renderer handles.
      Returns:
      the handled class
    • type

      Returns the log event type this renderer handles.
      Returns:
      the handled event type
    • render

      default void render(T obj, PrintStream ps)
      Renders the given object to the print stream with no indentation.
      Parameters:
      obj - the object to render
      ps - the output stream
    • render

      default String render(T obj, String indent)
      Renders the given object to a string with the specified indentation.
      Parameters:
      obj - the object to render
      indent - indentation prefix
      Returns:
      rendered string
    • render

      default String render(T obj)
      Renders the given object to a string with no indentation.
      Parameters:
      obj - the object to render
      Returns:
      rendered string
    • indent

      default String indent(String indent, String s)
      Prepends indent to each line of s.
      Parameters:
      indent - the indentation string
      s - the multi-line string to indent
      Returns:
      the indented string