You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by gg...@apache.org on 2021/12/30 13:42:48 UTC

[logging-log4j2] 01/02: Log4j 1.2 bridge class PatternLayout is missing constants DEFAULT_CONVERSION_PATTERN and TTCC_CONVERSION_PATTERN.

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch release-2.x
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git

commit 8c71bcd66ea2b7454c42fd3cc2fab89d52af828e
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Dec 30 08:42:35 2021 -0500

    Log4j 1.2 bridge class PatternLayout is missing constants
    DEFAULT_CONVERSION_PATTERN and TTCC_CONVERSION_PATTERN.
---
 .../src/main/java/org/apache/log4j/PatternLayout.java         | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/log4j-1.2-api/src/main/java/org/apache/log4j/PatternLayout.java b/log4j-1.2-api/src/main/java/org/apache/log4j/PatternLayout.java
index c2e1251..75c5e62 100644
--- a/log4j-1.2-api/src/main/java/org/apache/log4j/PatternLayout.java
+++ b/log4j-1.2-api/src/main/java/org/apache/log4j/PatternLayout.java
@@ -24,6 +24,17 @@ import org.apache.logging.log4j.util.Strings;
  */
 public class PatternLayout extends Layout {
 
+    /**
+     * Default pattern string for log output. Currently set to the string <b>{@value #DEFAULT_CONVERSION_PATTERN}</b> which
+     * just prints the application supplied message.
+     */
+    public final static String DEFAULT_CONVERSION_PATTERN = "%m%n";
+
+    /**
+     * A conversion pattern equivalent to the TTCCCLayout. Current value is <b>{@value #TTCC_CONVERSION_PATTERN}</b>
+     */
+    public final static String TTCC_CONVERSION_PATTERN = "%r [%t] %p %c %x - %m%n";
+
     public PatternLayout(final String pattern) {
 
     }