You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rp...@apache.org on 2015/01/12 09:53:07 UTC
[10/18] logging-log4j2 git commit: API change from StringBuilder to
Buffer; FormattingInfo is now internal to PatternConverter
API change from StringBuilder to Buffer; FormattingInfo is now internal
to PatternConverter
Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/ad38f0d3
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/ad38f0d3
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/ad38f0d3
Branch: refs/heads/LOG4J2-930
Commit: ad38f0d3ee96d7968d8f283f745d08c63af6a94c
Parents: 00c615f
Author: rpopma <rp...@apache.org>
Authored: Mon Jan 12 17:36:11 2015 +0900
Committer: rpopma <rp...@apache.org>
Committed: Mon Jan 12 17:36:11 2015 +0900
----------------------------------------------------------------------
.../log4j/core/pattern/PatternConverter.java | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/ad38f0d3/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/PatternConverter.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/PatternConverter.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/PatternConverter.java
index 01b072f..32bab58 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/PatternConverter.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/PatternConverter.java
@@ -29,25 +29,33 @@ public interface PatternConverter {
String CATEGORY = "Converter";
/**
- * Formats an object into a string buffer.
+ * Formats an object into the specified buffer.
*
- * @param obj event to format, may not be null.
- * @param toAppendTo string buffer to which the formatted event will be appended. May not be null.
+ * @param obj event to format, may not be null.
+ * @param toAppendTo string buffer to which the formatted event will be appended. May not be null.
*/
- void format(Object obj, StringBuilder toAppendTo);
+ void format(Object obj, Buffer toAppendTo);
/**
* Returns the name of the converter.
+ *
* @return The name of the converter.
*/
String getName();
/**
- * This method returns the CSS style class that should be applied to
- * the LoggingEvent passed as parameter, which can be null.
+ * This method returns the CSS style class that should be applied to the LoggingEvent passed as parameter, which can
+ * be null.
*
* @param e null values are accepted
* @return the name of the conversion pattern
*/
String getStyleClass(Object e);
+
+ /**
+ * Returns the {@code FormattingInfo} responsible for alignment and output width.
+ *
+ * @return the {@code FormattingInfo} for this converter or {@code null} if not applicable
+ */
+ FormattingInfo getFormattingInfo();
}