Repository: logging-log4j2 Updated Branches: refs/heads/release-2.x 2c5008bea -> b9d4578de
[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/b9d4578d Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/b9d4578d Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/b9d4578d Branch: refs/heads/release-2.x Commit: b9d4578de9272df95b7b60be5e372b7e33efa544 Parents: 2c5008b Author: AlBundy33 <[email protected]> Authored: Mon Oct 22 13:24:07 2018 -0600 Committer: Gary Gregory <[email protected]> Committed: Mon Oct 22 13:24:07 2018 -0600 ---------------------------------------------------------------------- .../java/org/apache/log4j/ConsoleAppender.java | 52 ++++++++++++++++++++ .../java/org/apache/log4j/SimpleLayout.java | 46 +++++++++++++++++ src/changes/changes.xml | 3 ++ 3 files changed, 101 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/b9d4578d/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/b9d4578d/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/b9d4578d/src/changes/changes.xml ---------------------------------------------------------------------- diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 392948d..74e38f0 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -100,6 +100,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">
