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 ce...@apache.org on 2005/01/05 18:27:58 UTC

cvs commit: logging-log4j/src/java/org/apache/log4j/net MulticastAppender.java

ceki        2005/01/05 09:27:57

  Modified:    src/java/org/apache/log4j/net MulticastAppender.java
  Log:
  - Removed non-default constructors.
  - Changed getAddressByName method to become instance method instead of static.
  
  Revision  Changes    Path
  1.8       +2 -21     logging-log4j/src/java/org/apache/log4j/net/MulticastAppender.java
  
  Index: MulticastAppender.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/net/MulticastAppender.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- MulticastAppender.java	20 Nov 2004 15:46:02 -0000	1.7
  +++ MulticastAppender.java	5 Jan 2005 17:27:57 -0000	1.8
  @@ -23,7 +23,6 @@
   import java.net.UnknownHostException;
   
   import org.apache.log4j.AppenderSkeleton;
  -import org.apache.log4j.LogManager;
   import org.apache.log4j.helpers.Constants;
   import org.apache.log4j.spi.LoggingEvent;
   
  @@ -75,23 +74,6 @@
     }
   
     /**
  -     Sends multicast packets to the <code>address</code> and <code>port</code>.
  -  */
  -  public MulticastAppender(InetAddress address, int port) {
  -    this.address = address;
  -    this.remoteHost = address.getHostName();
  -    this.port = port;
  -    connect();
  -  }
  -
  -  /**
  -     Sends multicast packets to the <code>address</code> and <code>port</code>.
  -  */
  -  public MulticastAppender(String host, int port) {
  -    this(getAddressByName(host), port);
  -  }
  -
  -  /**
        Open the multicast sender for the <b>RemoteHost</b> and <b>Port</b>.
     */
     public void activateOptions() {
  @@ -204,12 +186,11 @@
       }
     }
   
  -    static InetAddress getAddressByName(String host) {
  +  InetAddress getAddressByName(String host) {
       try {
         return InetAddress.getByName(host);
       } catch (Exception e) {
  -      LogManager.getLogger(MulticastAppender.class).error("Could not find address of [" + host + "].", e);
  -
  +      getLogger().error("Could not find address of [" + host + "].", e);
         return null;
       }
     }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org