Package com.adobe.acs.commons.util
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 InfoWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidend()Creates the closing line.voidline()Creates a line.voidline(int indent)Creates an indented (with whitespace) line.voidmessage(String message, Object... vars)Creates a message with optional var injection.voidtitle()Creates the opening line.voidtitle(String title)Creates the opening line with a Title.StringtoString()Gets the string representation of the InfoWriter.
-
-
-
Method Detail
-
toString
public String toString()
Gets 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
-
-