You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by vy...@apache.org on 2023/02/27 09:56:26 UTC
[logging-log4j2] 07/15: removed Factory, added #append methods for new data types
This is an automated email from the ASF dual-hosted git repository.
vy pushed a commit to branch scheduled-for-deletion/LOG4J2-930
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
commit 0eef761a644e77f63777a8ae79041dc10cbf213c
Author: rpopma <rp...@apache.org>
AuthorDate: Mon Jan 12 17:33:41 2015 +0900
removed Factory, added #append methods for new data types
---
.../apache/logging/log4j/core/pattern/Buffer.java | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/Buffer.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/Buffer.java
index f8e11e9983..fa31bae210 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/Buffer.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/Buffer.java
@@ -23,22 +23,36 @@ package org.apache.logging.log4j.core.pattern;
*/
public interface Buffer {
- public static interface Factory {
- Buffer createBuffer();
- }
-
Buffer append(Object object);
Buffer append(String text);
Buffer append(byte[] data);
+ Buffer append(byte byt);
+
Buffer append(char ch);
Buffer append(int value);
Buffer append(long value);
+ /**
+ * Appends the specified long to this buffer and applies the specified alignment and width adjustments.
+ *
+ * @param value the value to append (before applying alignment and width adjustments)
+ * @param formattingInfo can apply alignment and width adjustments
+ */
+ Buffer append(long value, FormattingInfo formattingInfo);
+
+ /**
+ * Appends the specified text to this buffer and applies the specified alignment and width adjustments.
+ *
+ * @param unformatted the text to append (before applying alignment and width adjustments)
+ * @param formattingInfo can apply alignment and width adjustments
+ */
+ Buffer append(String value, FormattingInfo formattingInfo);
+
int length();
void setLength(int length);