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 2015/05/01 10:09:39 UTC

logging-log4j2 git commit: CLI testing of [LOG4J2-1002] PatternLayout is missing a new line for Exceptions with the short option.

Repository: logging-log4j2
Updated Branches:
  refs/heads/master a10949efe -> e1664597a


CLI testing of [LOG4J2-1002] PatternLayout is missing a new line for
Exceptions with the short option.

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

Branch: refs/heads/master
Commit: e1664597a3e6721bf4a11027b1ee471191f3dacf
Parents: a10949e
Author: Gary Gregory <ga...@gmail.com>
Authored: Fri May 1 01:09:36 2015 -0700
Committer: Gary Gregory <ga...@gmail.com>
Committed: Fri May 1 01:09:36 2015 -0700

----------------------------------------------------------------------
 ...ppenderJira1002ShortThrowableLayoutMain.java | 29 ++++++++++++++++++
 log4j-core/src/test/resources/log4j2-1002.xml   | 32 ++++++++++++++++++++
 2 files changed, 61 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/e1664597/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/ConsoleAppenderJira1002ShortThrowableLayoutMain.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/ConsoleAppenderJira1002ShortThrowableLayoutMain.java b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/ConsoleAppenderJira1002ShortThrowableLayoutMain.java
new file mode 100644
index 0000000..b257e95
--- /dev/null
+++ b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/ConsoleAppenderJira1002ShortThrowableLayoutMain.java
@@ -0,0 +1,29 @@
+/*
+ * 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.logging.log4j.core.appender;
+
+
+/**
+ * Tests LOG4J2-1002.
+ */
+public class ConsoleAppenderJira1002ShortThrowableLayoutMain {
+
+    public static void main(final String[] args) {
+        ConsoleAppenderNoAnsiStyleLayoutMain.test(args, "target/test-classes/log4j2-1002.xml");
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/e1664597/log4j-core/src/test/resources/log4j2-1002.xml
----------------------------------------------------------------------
diff --git a/log4j-core/src/test/resources/log4j2-1002.xml b/log4j-core/src/test/resources/log4j2-1002.xml
new file mode 100644
index 0000000..298440b
--- /dev/null
+++ b/log4j-core/src/test/resources/log4j2-1002.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+
+-->
+<Configuration status="OFF">
+  <Appenders>
+    <Console name="Console" target="SYSTEM_OUT">
+      <PatternLayout noConsoleNoAnsi="true"
+        pattern="%style{%d}{black} %style{[%t]}{blue} %style{%-5level:}{yellow} %style{%msg%n%throwable{short}}{green}" />
+    </Console>
+  </Appenders>
+  <Loggers>
+    <Logger name="org.foo" level="DEBUG" />
+    <Root level="TRACE">
+      <AppenderRef ref="Console" />
+    </Root>
+  </Loggers>
+</Configuration>