Repository: logging-log4j2
Updated Branches:
  refs/heads/master a11be1791 -> e8e3d224a


[LOG4J2-2476] org.apache.log4j.SimpleLayout and ConsoleAppender missing
in log4j-1.2-api.


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/e8e3d224
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/e8e3d224
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/e8e3d224

Branch: refs/heads/master
Commit: e8e3d224a38c83ac93b471ec516c523de813ef67
Parents: a11be17
Author: AlBundy33 <[email protected]>
Authored: Mon Oct 22 13:25:05 2018 -0600
Committer: Gary Gregory <[email protected]>
Committed: Mon Oct 22 13:25:05 2018 -0600

----------------------------------------------------------------------
 .../java/org/apache/log4j/ConsoleAppender.java  | 52 ++++++++++++++++++++
 .../java/org/apache/log4j/SimpleLayout.java     | 46 +++++++++++++++++
 src/changes/changes.xml                         |  6 +++
 3 files changed, 104 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/e8e3d224/log4j-1.2-api/src/main/java/org/apache/log4j/ConsoleAppender.java
----------------------------------------------------------------------
diff --git a/log4j-1.2-api/src/main/java/org/apache/log4j/ConsoleAppender.java 
b/log4j-1.2-api/src/main/java/org/apache/log4j/ConsoleAppender.java
new file mode 100644
index 0000000..0e841c5
--- /dev/null
+++ b/log4j-1.2-api/src/main/java/org/apache/log4j/ConsoleAppender.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+package org.apache.log4j;
+
+import org.apache.log4j.spi.LoggingEvent;
+
+/**
+ * Console-appender.
+ */
+public class ConsoleAppender extends AppenderSkeleton
+{
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public void close()
+  {
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public boolean requiresLayout()
+  {
+    return false;
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  protected void append(LoggingEvent theEvent)
+  {
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/e8e3d224/log4j-1.2-api/src/main/java/org/apache/log4j/SimpleLayout.java
----------------------------------------------------------------------
diff --git a/log4j-1.2-api/src/main/java/org/apache/log4j/SimpleLayout.java 
b/log4j-1.2-api/src/main/java/org/apache/log4j/SimpleLayout.java
new file mode 100644
index 0000000..3b2374c
--- /dev/null
+++ b/log4j-1.2-api/src/main/java/org/apache/log4j/SimpleLayout.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+package org.apache.log4j;
+
+import org.apache.log4j.spi.LoggingEvent;
+import org.apache.logging.log4j.util.Strings;
+
+/**
+ * Simple-layout.
+ */
+public class SimpleLayout extends Layout
+{
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public String format(LoggingEvent theEvent)
+  {
+    return Strings.EMPTY;
+  }
+
+  /**
+   * {@inheritDoc}
+   */
+  @Override
+  public boolean ignoresThrowable()
+  {
+    return true;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/e8e3d224/src/changes/changes.xml
----------------------------------------------------------------------
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 29cb5c4..8e0721d 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -293,6 +293,9 @@
       <action issue="LOG4J2-2482" dev="ggregory" type="fix" due-to="Rob 
Gansevles">
         BasicContextSelector cannot be used in a OSGI application.
       </action>
+      <action issue="LOG4J2-2476" dev="ggregory" type="fix" due-to="Al Bundy">
+        org.apache.log4j.SimpleLayout and ConsoleAppender missing in 
log4j-1.2-api.
+      </action>
     </release>
     <release version="2.11.2" date="2018-MM-DD" description="GA Release 
2.11.2">
       <action issue="LOG4J2-2391" dev="ckozak" type="update">
@@ -367,6 +370,9 @@
       <action issue="LOG4J2-2482" dev="ggregory" type="fix" due-to="Rob 
Gansevles">
         BasicContextSelector cannot be used in a OSGI application.
       </action>
+      <action issue="LOG4J2-2476" dev="ggregory" type="fix" due-to="Al Bundy">
+        org.apache.log4j.SimpleLayout and ConsoleAppender missing in 
log4j-1.2-api.
+      </action>
     </release>
     <release version="2.11.1" date="2018-07-22" description="GA Release 
2.11.1">
       <action issue="LOG4J2-2389" dev="rgoers" type="fix" due-to="Liu Wen">

Reply via email to