You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by sd...@apache.org on 2006/07/19 06:02:33 UTC
svn commit: r423360 - in /logging/log4j/trunk/src/java/org/apache/log4j:
helpers/Constants.java varia/LogFilePatternReceiver.java
Author: sdeboy
Date: Tue Jul 18 21:02:33 2006
New Revision: 423360
URL: http://svn.apache.org/viewvc?rev=423360&view=rev
Log:
Add 'receiver' property to each event generated by LogFilePatternReceiver.
Modified:
logging/log4j/trunk/src/java/org/apache/log4j/helpers/Constants.java
logging/log4j/trunk/src/java/org/apache/log4j/varia/LogFilePatternReceiver.java
Modified: logging/log4j/trunk/src/java/org/apache/log4j/helpers/Constants.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/java/org/apache/log4j/helpers/Constants.java?rev=423360&r1=423359&r2=423360&view=diff
==============================================================================
--- logging/log4j/trunk/src/java/org/apache/log4j/helpers/Constants.java (original)
+++ logging/log4j/trunk/src/java/org/apache/log4j/helpers/Constants.java Tue Jul 18 21:02:33 2006
@@ -34,6 +34,7 @@
static final String APPLICATION_KEY = "application";
static final String HOSTNAME_KEY = "hostname";
+ static final String RECEIVER_NAME_KEY = "receiver";
static final String LOG4J_ID_KEY = "log4jid";
public static final String TIMESTAMP_RULE_FORMAT = "yyyy/MM/dd HH:mm:ss";
Modified: logging/log4j/trunk/src/java/org/apache/log4j/varia/LogFilePatternReceiver.java
URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/java/org/apache/log4j/varia/LogFilePatternReceiver.java?rev=423360&r1=423359&r2=423360&view=diff
==============================================================================
--- logging/log4j/trunk/src/java/org/apache/log4j/varia/LogFilePatternReceiver.java (original)
+++ logging/log4j/trunk/src/java/org/apache/log4j/varia/LogFilePatternReceiver.java Tue Jul 18 21:02:33 2006
@@ -719,7 +719,7 @@
threadName = (String) fieldMap.remove(THREAD);
- message = (String) fieldMap.remove(MESSAGE);
+ message = fieldMap.remove(MESSAGE);
if (message == null) {
message = "";
}
@@ -736,6 +736,7 @@
properties.put(Constants.HOSTNAME_KEY, host);
properties.put(Constants.APPLICATION_KEY, path);
+ properties.put(Constants.RECEIVER_NAME_KEY, getName());
//all remaining entries in fieldmap are properties
properties.putAll(fieldMap);
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org