logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject cvs commit: jakarta-log4j/src/xdocs download.xml
Date Thu, 01 Aug 2002 16:14:57 GMT
ceki        2002/08/01 09:14:56

  Modified:    src/java/org/apache/log4j/net Tag: v1_2-branch
                        JMSAppender.java JMSSink.java
               src/xdocs Tag: v1_2-branch download.xml
  Log:
  Small improvements to JMSAppender and JMSSink.
  
  Preparing to release 1.2.6.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.13.2.2  +1 -2      jakarta-log4j/src/java/org/apache/log4j/net/JMSAppender.java
  
  Index: JMSAppender.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/net/JMSAppender.java,v
  retrieving revision 1.13.2.1
  retrieving revision 1.13.2.2
  diff -u -r1.13.2.1 -r1.13.2.2
  --- JMSAppender.java	31 Jul 2002 09:25:13 -0000	1.13.2.1
  +++ JMSAppender.java	1 Aug 2002 16:14:56 -0000	1.13.2.2
  @@ -196,9 +196,8 @@
         topicConnectionFactory = (TopicConnectionFactory) lookup(jndi, tcfBindingName);
         LogLog.debug("About to create TopicConnection.");
         if(userName != null) {
  -	LogLog.debug("--------User name: "+userName);
   	topicConnection = topicConnectionFactory.createTopicConnection(userName, 
  -								       password);	
  +								       password); 
         } else {
   	topicConnection = topicConnectionFactory.createTopicConnection();
         }
  
  
  
  1.12.2.2  +25 -2     jakarta-log4j/src/java/org/apache/log4j/net/JMSSink.java
  
  Index: JMSSink.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/net/JMSSink.java,v
  retrieving revision 1.12.2.1
  retrieving revision 1.12.2.2
  diff -u -r1.12.2.1 -r1.12.2.2
  --- JMSSink.java	31 Jul 2002 09:25:13 -0000	1.12.2.1
  +++ JMSSink.java	1 Aug 2002 16:14:56 -0000	1.12.2.2
  @@ -14,6 +14,7 @@
   import org.apache.log4j.spi.LoggerRepository;
   import org.apache.log4j.or.jms.MessageRenderer;
   import org.apache.log4j.PropertyConfigurator;
  +import org.apache.log4j.xml.DOMConfigurator;
   import org.apache.log4j.helpers.LogLog;
   
   import javax.jms.Message;
  @@ -27,6 +28,9 @@
   import javax.jms.ObjectMessage;
   import javax.jms.JMSException;
   
  +import java.io.BufferedReader;
  +import java.io.InputStreamReader;
  +
   import javax.naming.InitialContext;
   import javax.naming.Context;
   import javax.naming.NameNotFoundException;
  @@ -44,7 +48,7 @@
   
     static Logger logger = Logger.getLogger(JMSSink.class);
   
  -  static public void main(String[] args) {
  +  static public void main(String[] args) throws Exception {
       if(args.length != 5) {
         usage("Wrong number of arguments.");
       }
  @@ -53,10 +57,29 @@
       String topicBindingName = args[1];
       String username = args[2];
       String password = args[3];
  -    PropertyConfigurator.configure(args[4]);
  +    
  +    
  +    String configFile = args[4];
   
  +    if(configFile.endsWith(".xml")) {
  +      new DOMConfigurator().configure(configFile);
  +    } else {
  +      new PropertyConfigurator().configure(configFile);
  +    }
  +    
       new JMSSink(tcfBindingName, topicBindingName, username, password);
   
  +    BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
  +    // Loop until the word "exit" is typed
  +    System.out.println("Type \"exit\" to quit JMSSink.");
  +    while(true){
  +      String s = stdin.readLine( );
  +      if (s.equalsIgnoreCase("exit")) {
  +	System.out.println("Exiting. Kill the application if it does not exit "
  +			   + "due to daemon threads.");
  +	return; 
  +      }
  +    } 
     }
   
     public JMSSink( String tcfBindingName, String topicBindingName, String username,
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.53.2.10 +5 -5      jakarta-log4j/src/xdocs/download.xml
  
  Index: download.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/xdocs/download.xml,v
  retrieving revision 1.53.2.9
  retrieving revision 1.53.2.10
  diff -u -r1.53.2.9 -r1.53.2.10
  --- download.xml	11 Jul 2002 09:12:22 -0000	1.53.2.9
  +++ download.xml	1 Aug 2002 16:14:56 -0000	1.53.2.10
  @@ -9,14 +9,14 @@
     <meta name="keywords" content="java, logging, tracing, component, framework, API,
log4j"/>
   <body>
   
  -    <section name="log4j version 1.2.5">
  -      <p>log4j 1.2.5 is available in <a
  -	href="../jakarta-log4j-1.2.5.tar.gz"><b>TAR.GZ</b></a> format
  -	or in <a href="../jakarta-log4j-1.2.5.zip"><b>ZIP</b></a>
  +    <section name="log4j version 1.2.6">
  +      <p>log4j 1.2.6 is available in <a
  +	href="../jakarta-log4j-1.2.6.tar.gz"><b>TAR.GZ</b></a> format
  +	or in <a href="../jakarta-log4j-1.2.6.zip"><b>ZIP</b></a>
   	format.
         </p>
   
  -      <p>Release 1.2.5 fixes minor bugs. See the <a
  +      <p>Release 1.2.6 fixes minor bugs. See the <a
         href="HISTORY">HISTORY</a> file for the exact details.
         </p>
         
  
  
  

--
To unsubscribe, e-mail:   <mailto:log4j-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-dev-help@jakarta.apache.org>


Mime
View raw message