Class InfoWriter

java.lang.Object
com.adobe.acs.commons.util.InfoWriter

public final class InfoWriter extends Object
Utility class to help create normalized logging messages especially to display configuration info in OSGi Components' activate methods.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    end()
    Creates the closing line.
    void
    Creates a line.
    void
    line(int indent)
    Creates an indented (with whitespace) line.
    void
    message(String message, Object... vars)
    Creates a message with optional var injection.
    void
    Creates the opening line.
    void
    title(String title)
    Creates the opening line with a Title.
    Gets the string representation of the InfoWriter.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • InfoWriter

      public InfoWriter()
  • Method Details

    • toString

      public String toString()
      Gets the string representation of the InfoWriter.
      Overrides:
      toString in class Object
      Returns:
      the string representation of the InfoWriter
    • title

      public void title()
      Creates the opening line.
    • title

      public void title(String title)
      Creates the opening line with a Title.
      Parameters:
      title - the title
    • message

      public void message(String message, Object... vars)
      Creates a message with optional var injection. Message format: "A String with any number of {} placeholders that will have the vars injected in order"
      Parameters:
      message - the message string with the injection placeholders ({})
      vars - the vars to inject into the the message template; some type conversion will occur for common data types
    • end

      public void end()
      Creates the closing line.
    • line

      public void line()
      Creates a line.
    • line

      public void line(int indent)
      Creates an indented (with whitespace) line.
      Parameters:
      indent - number of spaces to indent the line