logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sde...@apache.org
Subject svn commit: r423360 - in /logging/log4j/trunk/src/java/org/apache/log4j: helpers/Constants.java varia/LogFilePatternReceiver.java
Date Wed, 19 Jul 2006 04:02:33 GMT
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


Mime
View raw message