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/02/21 06:00:30 UTC
logging-log4j2 git commit: [LOG4J2-950] Incorrect attribute name in
PropertiesRewritePolicy example.
Repository: logging-log4j2
Updated Branches:
refs/heads/master 913ed21b4 -> b77d7c028
[LOG4J2-950] Incorrect attribute name in PropertiesRewritePolicy
example.
Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/b77d7c02
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/b77d7c02
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/b77d7c02
Branch: refs/heads/master
Commit: b77d7c0284b97b08178e4e871873f536d57077fb
Parents: 913ed21
Author: Gary Gregory <ga...@gmail.com>
Authored: Fri Feb 20 21:00:15 2015 -0800
Committer: Gary Gregory <ga...@gmail.com>
Committed: Fri Feb 20 21:00:15 2015 -0800
----------------------------------------------------------------------
.../org/apache/logging/log4j/core/config/Property.java | 13 +++++++------
src/changes/changes.xml | 3 +++
src/site/xdoc/manual/appenders.xml | 4 ++--
3 files changed, 12 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/b77d7c02/log4j-core/src/main/java/org/apache/logging/log4j/core/config/Property.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/Property.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/Property.java
index c4dba14..c33efb4 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/Property.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/Property.java
@@ -56,19 +56,20 @@ public final class Property {
}
/**
- * Create a Property.
- * @param key The key.
+ * Creates a Property.
+ *
+ * @param name The key.
* @param value The value.
* @return A Property.
*/
@PluginFactory
public static Property createProperty(
- @PluginAttribute("name") final String key,
+ @PluginAttribute("name") final String name,
@PluginValue("value") final String value) {
- if (key == null) {
- LOGGER.error("Property key cannot be null");
+ if (name == null) {
+ LOGGER.error("Property name cannot be null");
}
- return new Property(key, value);
+ return new Property(name, value);
}
@Override
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/b77d7c02/src/changes/changes.xml
----------------------------------------------------------------------
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 298db73..7e8fece 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -33,6 +33,9 @@
<action issue="LOG4J2-955" dev="rpopma" type="update">
Documentation: clarify system properties to control status logger, improve troubleshooting FAQ entry.
</action>
+ <action issue="LOG4J2-950" dev="ggregory" type="update" due-to="Joel Edwards">
+ Incorrect attribute name in PropertiesRewritePolicy example.
+ </action>
<action issue="LOG4J2-944" dev="ggregory" type="fix" due-to="Vinayaka Ramachandra">
Log4j Flume appender is not adding millisecond to the event headers when the event is logged at 000 milliseconds.
</action>
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/b77d7c02/src/site/xdoc/manual/appenders.xml
----------------------------------------------------------------------
diff --git a/src/site/xdoc/manual/appenders.xml b/src/site/xdoc/manual/appenders.xml
index 037ecbb..7b12d83 100644
--- a/src/site/xdoc/manual/appenders.xml
+++ b/src/site/xdoc/manual/appenders.xml
@@ -1900,8 +1900,8 @@ public class JpaLogEntity extends AbstractLogEventWrapperEntity {
<Rewrite name="rewrite">
<AppenderRef ref="STDOUT"/>
<PropertiesRewritePolicy>
- <Property key="user">${sys:user.name}</Property>
- <Property key="env">${sys:environment}</Property>
+ <Property name="user">${sys:user.name}</Property>
+ <Property name="env">${sys:environment}</Property>
</PropertiesRewritePolicy>
</Rewrite>
</Appenders>