Class 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 Detail

      • InfoWriter

        public InfoWriter()
    • Method Detail

      • 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