svn commit: r691872 - in /logging/log4j/companions/receivers/trunk: pom.xml src/changes/changes.xml src/main/java/org/apache/log4j/net/SocketHubReceiver.java src/main/java/org/apache/log4j/net/SocketN

2008-09-03 Thread psmith
Author: psmith
Date: Wed Sep  3 21:57:11 2008
New Revision: 691872

URL: http://svn.apache.org/viewvc?rev=691872view=rev
Log:
Bug 42171 Applied patch supplied by ray@ that resolves a bug where by duplicate 
events are received
after a SocketHubReceiver is shutdown and then restartedi such as when used 
under Chainsaw.


Modified:
logging/log4j/companions/receivers/trunk/pom.xml
logging/log4j/companions/receivers/trunk/src/changes/changes.xml

logging/log4j/companions/receivers/trunk/src/main/java/org/apache/log4j/net/SocketHubReceiver.java

logging/log4j/companions/receivers/trunk/src/main/java/org/apache/log4j/net/SocketNode13.java

Modified: logging/log4j/companions/receivers/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/logging/log4j/companions/receivers/trunk/pom.xml?rev=691872r1=691871r2=691872view=diff
==
--- logging/log4j/companions/receivers/trunk/pom.xml (original)
+++ logging/log4j/companions/receivers/trunk/pom.xml Wed Sep  3 21:57:11 2008
@@ -216,7 +216,7 @@
 dependency
   groupIdlog4j/groupId
   artifactIdlog4j/artifactId
-  version1.2.15/version
+  version1.2.16-SNAPSHOT/version
 /dependency
 dependency
   groupIdlog4j/groupId

Modified: logging/log4j/companions/receivers/trunk/src/changes/changes.xml
URL: 
http://svn.apache.org/viewvc/logging/log4j/companions/receivers/trunk/src/changes/changes.xml?rev=691872r1=691871r2=691872view=diff
==
--- logging/log4j/companions/receivers/trunk/src/changes/changes.xml (original)
+++ logging/log4j/companions/receivers/trunk/src/changes/changes.xml Wed Sep  3 
21:57:11 2008
@@ -24,6 +24,7 @@
   action issue=42102 type=add
 Initial release of receivers companion backported from log4j 1.3.
   /action
+  action issue=42171 type=fixSocketHubReceiver duplicates 
messages/action
 /release
   /body
 /document

Modified: 
logging/log4j/companions/receivers/trunk/src/main/java/org/apache/log4j/net/SocketHubReceiver.java
URL: 
http://svn.apache.org/viewvc/logging/log4j/companions/receivers/trunk/src/main/java/org/apache/log4j/net/SocketHubReceiver.java?rev=691872r1=691871r2=691872view=diff
==
--- 
logging/log4j/companions/receivers/trunk/src/main/java/org/apache/log4j/net/SocketHubReceiver.java
 (original)
+++ 
logging/log4j/companions/receivers/trunk/src/main/java/org/apache/log4j/net/SocketHubReceiver.java
 Wed Sep  3 21:57:11 2008
@@ -76,7 +76,7 @@
 /**
  * Socket.
  */
-  protected Socket socket;
+  protected SocketNode13 socketNode;
 
 /**
  * Listener list.
@@ -255,13 +255,14 @@
 
 // close the socket
 try {
-  if (socket != null) {
-socket.close();
+  if (socketNode != null) {
+socketNode.close();
+socketNode = null;
   }
 } catch (Exception e) {
+  getLogger().info(Excpetion closing socket, e);
   // ignore for now
 }
-socket = null;
 
 // stop the connector
 if (connector != null) {
@@ -276,11 +277,14 @@
@param e exception not used.
*/
   public void socketClosedEvent(final Exception e) {
+// if it is a non-normal closed event
 // we clear the connector object here
 // so that it actually does reconnect if the
 // remote socket dies.
-connector = null;
-fireConnector(true);
+if (e != null) {
+  connector = null;
+  fireConnector(true);
+}
   }
 
 /**
@@ -303,18 +307,17 @@
  */
   private synchronized void setSocket(final Socket newSocket) {
 connector = null;
-socket = newSocket;
-SocketNode13 node = new SocketNode13(socket, this);
-node.addSocketNodeEventListener(this);
+socketNode = new SocketNode13(newSocket, this);
+socketNode.addSocketNodeEventListener(this);
 
 synchronized (listenerList) {
 for (Iterator iter = listenerList.iterator(); iter.hasNext();) {
 SocketNodeEventListener listener =
 (SocketNodeEventListener) iter.next();
-node.addSocketNodeEventListener(listener);
+socketNode.addSocketNodeEventListener(listener);
 }
 }
-new Thread(node).start();
+new Thread(socketNode).start();
   }
 
   /**

Modified: 
logging/log4j/companions/receivers/trunk/src/main/java/org/apache/log4j/net/SocketNode13.java
URL: 
http://svn.apache.org/viewvc/logging/log4j/companions/receivers/trunk/src/main/java/org/apache/log4j/net/SocketNode13.java?rev=691872r1=691871r2=691872view=diff
==
--- 
logging/log4j/companions/receivers/trunk/src/main/java/org/apache/log4j/net/SocketNode13.java
 (original)
+++ 
logging/log4j/companions/receivers/trunk/src/main/java/org/apache/log4j/net/SocketNode13.java
 Wed Sep  3 21:57:11 2008
@@ -61,6 +61,10

svn commit: r686131 - in /logging/log4j/trunk/src: changes/ main/java/org/apache/log4j/jmx/

2008-08-14 Thread psmith
Author: psmith
Date: Thu Aug 14 20:31:30 2008
New Revision: 686131

URL: http://svn.apache.org/viewvc?rev=686131view=rev
Log:
Bug 40246 Added cleaned up patch provided by wing tung Leung to allow the JMX 
Beans created to properly deregister, allowing
Servlet Containers that shutdown/restart to be able to (re)register new JMX 
beans of the same name.


Modified:
logging/log4j/trunk/src/changes/changes.xml

logging/log4j/trunk/src/main/java/org/apache/log4j/jmx/AbstractDynamicMBean.java

logging/log4j/trunk/src/main/java/org/apache/log4j/jmx/AppenderDynamicMBean.java

logging/log4j/trunk/src/main/java/org/apache/log4j/jmx/HierarchyDynamicMBean.java

logging/log4j/trunk/src/main/java/org/apache/log4j/jmx/LoggerDynamicMBean.java

Modified: logging/log4j/trunk/src/changes/changes.xml
URL: 
http://svn.apache.org/viewvc/logging/log4j/trunk/src/changes/changes.xml?rev=686131r1=686130r2=686131view=diff
==
--- logging/log4j/trunk/src/changes/changes.xml (original)
+++ logging/log4j/trunk/src/changes/changes.xml Thu Aug 14 20:31:30 2008
@@ -56,6 +56,7 @@
action action=fix issue=40888Weekly rotation problem in 
Europe./action
action action=fix issue=43282Add OSGi packaging info./action
action action=fix issue=44157InterruptedIOException ignored by 
log4j./action
+   action action=fix issue=40246HierarchyDynamicMBean missing 
unregister MBean/action
 /release
   
 release version=1.2.15 date=2007-08-24 description=SyslogAppender 
enhancements, NTEventLogAppender and Maven build.

Modified: 
logging/log4j/trunk/src/main/java/org/apache/log4j/jmx/AbstractDynamicMBean.java
URL: 
http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org/apache/log4j/jmx/AbstractDynamicMBean.java?rev=686131r1=686130r2=686131view=diff
==
--- 
logging/log4j/trunk/src/main/java/org/apache/log4j/jmx/AbstractDynamicMBean.java
 (original)
+++ 
logging/log4j/trunk/src/main/java/org/apache/log4j/jmx/AbstractDynamicMBean.java
 Thu Aug 14 20:31:30 2008
@@ -17,25 +17,31 @@
 
 package org.apache.log4j.jmx;
 
-//import java.lang.reflect.Constructor;
-
-import org.apache.log4j.Logger;
+import java.util.Enumeration;
+import java.util.Iterator;
+import java.util.Vector;
 
 import javax.management.Attribute;
 import javax.management.AttributeList;
 import javax.management.DynamicMBean;
+import javax.management.InstanceAlreadyExistsException;
+import javax.management.InstanceNotFoundException;
 import javax.management.JMException;
 import javax.management.MBeanRegistration;
+import javax.management.MBeanRegistrationException;
 import javax.management.MBeanServer;
+import javax.management.NotCompliantMBeanException;
 import javax.management.ObjectName;
 import javax.management.RuntimeOperationsException;
-import java.util.Iterator;
+
+import org.apache.log4j.Logger;
 
 public abstract class AbstractDynamicMBean implements DynamicMBean,
   MBeanRegistration {
 
   String dClassName;
   MBeanServer server;
+  private final Vector mbeanList = new Vector();
 
   /**
* Enables the to get the values of several attributes of the Dynamic MBean.
@@ -121,17 +127,44 @@
 
 
   public
-  void preDeregister() {
-getLogger().debug(preDeregister called.);
-  }
-
-  public
   ObjectName preRegister(MBeanServer server, ObjectName name) {
 getLogger().debug(preRegister called. Server=+server+ , name=+name);
 this.server = server;
 return name;
   }
+  /**
+   * Registers MBean instance in the attached server. Must emNOT/em
+   * be called before registration of this instance.
+   */
+  protected
+  void registerMBean(Object mbean, ObjectName objectName)
+  throws InstanceAlreadyExistsException, MBeanRegistrationException,
+   NotCompliantMBeanException {
+server.registerMBean(mbean, objectName);
+mbeanList.add(objectName);
+  }
 
+  /**
+   * Performs cleanup for deregistering this MBean. Default implementation
+   * unregisters MBean instances which are registered using 
+   * [EMAIL PROTECTED] #registerMBean(Object mbean, ObjectName objectName)}.
+   */
+   public
+   void preDeregister() {
+ getLogger().debug(preDeregister called.);
+ 
+Enumeration iterator = mbeanList.elements();
+while (iterator.hasMoreElements()) {
+  ObjectName name = (ObjectName) iterator.nextElement();
+  try {
+server.unregisterMBean(name);
+  } catch (InstanceNotFoundException e) {
+   getLogger().warn(Missing MBean  + name.getCanonicalName());
+  } catch (MBeanRegistrationException e) {
+   getLogger().warn(Failed unregistering  + name.getCanonicalName());
+  }
+}
+   }
 
 
 }

Modified: 
logging/log4j/trunk/src/main/java/org/apache/log4j/jmx/AppenderDynamicMBean.java
URL: 
http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org

svn commit: r681522 - /logging/log4j/trunk/pom.xml

2008-07-31 Thread psmith
Author: psmith
Date: Thu Jul 31 15:23:46 2008
New Revision: 681522

URL: http://svn.apache.org/viewvc?rev=681522view=rev
Log:
Change the svn:eol-style property to 'native' to avoid evil whitespace diffs!  

Why the SVN team deemed not to support this for XML files from Day 1 still 
escapes me.


Modified:
logging/log4j/trunk/pom.xml   (props changed)

Propchange: logging/log4j/trunk/pom.xml
--
svn:eol-style = native



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r681536 - /logging/log4j/trunk/pom.xml

2008-07-31 Thread psmith
Author: psmith
Date: Thu Jul 31 16:00:20 2008
New Revision: 681536

URL: http://svn.apache.org/viewvc?rev=681536view=rev
Log:
Bug 45517
Provide tweaked patch provided by Thorbørn to remove a dependency on Sun's JMS 
stuff.

Slightly tweaked in that I retained the optional modifier because we don't 
want that to 
be marked as transitive dependency (we b0rk3d that in 1.2.15, I'd hate to redo 
it).


Modified:
logging/log4j/trunk/pom.xml

Modified: logging/log4j/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/logging/log4j/trunk/pom.xml?rev=681536r1=681535r2=681536view=diff
==
--- logging/log4j/trunk/pom.xml (original)
+++ logging/log4j/trunk/pom.xml Thu Jul 31 16:00:20 2008
@@ -292,6 +292,8 @@
 scopesystem/scope
 systemPath${tools.jar}/systemPath
   /dependency
+ 
+
 /dependencies
   /plugin
   plugin
@@ -396,11 +398,6 @@
 /profile
   /profiles
   repositories
-repository
-  idjava.net/id
-  urlhttps://maven-repository.dev.java.net/nonav/repository/url
-  layoutlegacy/layout
-/repository
   /repositories
   dependencies
 dependency
@@ -410,12 +407,6 @@
   optionaltrue/optional
 /dependency
 dependency
-  groupIdjavax.jms/groupId
-  artifactIdjms/artifactId
-  version1.1/version
-  optionaltrue/optional
-/dependency
-dependency
   groupIdcom.sun.jdmk/groupId
   artifactIdjmxtools/artifactId
   version1.2.1/version
@@ -439,7 +430,13 @@
   version3.8.1/version
   scopetest/scope
 /dependency
-  /dependencies
+dependency
+  groupIdorg.apache.geronimo.specs/groupId
+  artifactIdgeronimo-jms_1.1_spec/artifactId
+  version1.0/version
+  optionaltrue/optional
+/dependency
+ /dependencies
   reporting
 excludeDefaultstrue/excludeDefaults
 plugins
@@ -489,4 +486,4 @@
   urlscp://localhost/${user.dir}/target/site-deploy/url
 /site
   /distributionManagement
-/project
+/project
\ No newline at end of file



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r672042 - /logging/log4j/companions/extras/trunk/src/test/java/org/apache/log4j/rolling/CompositeTriggeringPolicyTest.java

2008-06-26 Thread psmith
Author: psmith
Date: Thu Jun 26 15:27:04 2008
New Revision: 672042

URL: http://svn.apache.org/viewvc?rev=672042view=rev
Log:
Replace Assert import with standard package.  Really not sure why this is not 
required
on the maven command line, but Eclipse refuses to find it for some reason.

Modified:

logging/log4j/companions/extras/trunk/src/test/java/org/apache/log4j/rolling/CompositeTriggeringPolicyTest.java

Modified: 
logging/log4j/companions/extras/trunk/src/test/java/org/apache/log4j/rolling/CompositeTriggeringPolicyTest.java
URL: 
http://svn.apache.org/viewvc/logging/log4j/companions/extras/trunk/src/test/java/org/apache/log4j/rolling/CompositeTriggeringPolicyTest.java?rev=672042r1=672041r2=672042view=diff
==
--- 
logging/log4j/companions/extras/trunk/src/test/java/org/apache/log4j/rolling/CompositeTriggeringPolicyTest.java
 (original)
+++ 
logging/log4j/companions/extras/trunk/src/test/java/org/apache/log4j/rolling/CompositeTriggeringPolicyTest.java
 Thu Jun 26 15:27:04 2008
@@ -17,6 +17,7 @@
 
 package org.apache.log4j.rolling;
 
+import junit.framework.Assert;
 import junit.framework.TestCase;
 
 import org.apache.log4j.Appender;
@@ -25,7 +26,6 @@
 import org.apache.log4j.Logger;
 import org.apache.log4j.PatternLayout;
 import org.apache.log4j.spi.LoggingEvent;
-import org.junit.Assert;
 
 
 /**



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r636954 - in /logging/log4j/trunk/src: changes/ main/java/org/apache/log4j/ main/java/org/apache/log4j/helpers/ main/java/org/apache/log4j/net/ main/java/org/apache/log4j/varia/

2008-03-13 Thread psmith
Author: psmith
Date: Thu Mar 13 19:04:13 2008
New Revision: 636954

URL: http://svn.apache.org/viewvc?rev=636954view=rev
Log:
Bug 41156 Give log4j threads reasonable names.

Thread names are based on the class name that is the creator/related entity, and
where threads are based on Socket management, the port # being managed is 
included
in the name.  This follows a convention seen in many other packages (such as 
Tomcat)
to easily identify the resource the Thread is controlling.

I have renamed the AsyncAppender thread name that was already given an explicit 
name
to follow the above convention.

Modified:
logging/log4j/trunk/src/changes/changes.xml
logging/log4j/trunk/src/main/java/org/apache/log4j/AsyncAppender.java
logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/FileWatchdog.java

logging/log4j/trunk/src/main/java/org/apache/log4j/net/SimpleSocketServer.java

logging/log4j/trunk/src/main/java/org/apache/log4j/net/SocketHubAppender.java

logging/log4j/trunk/src/main/java/org/apache/log4j/varia/ExternallyRolledFileAppender.java

Modified: logging/log4j/trunk/src/changes/changes.xml
URL: 
http://svn.apache.org/viewvc/logging/log4j/trunk/src/changes/changes.xml?rev=636954r1=636953r2=636954view=diff
==
--- logging/log4j/trunk/src/changes/changes.xml (original)
+++ logging/log4j/trunk/src/changes/changes.xml Thu Mar 13 19:04:13 2008
@@ -37,6 +37,7 @@
action action=fix issue=43304Make javamail, jmx, jms dependencies 
optional in pom.xml./action
action action=add issue=43874SocketHubAppender should expose 
actual port in use to extending classes./action
action action=add issue=44551SocketHubAppender in the 1.2.16 does 
not support a scroll back buffer or application property/action
+   action action=add issue=41156Give log4j threads reasonable 
names/action
 /release
   
 release version=1.2.15 date=2007-08-24 description=SyslogAppender 
enhancements, NTEventLogAppender and Maven build.

Modified: logging/log4j/trunk/src/main/java/org/apache/log4j/AsyncAppender.java
URL: 
http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org/apache/log4j/AsyncAppender.java?rev=636954r1=636953r2=636954view=diff
==
--- logging/log4j/trunk/src/main/java/org/apache/log4j/AsyncAppender.java 
(original)
+++ logging/log4j/trunk/src/main/java/org/apache/log4j/AsyncAppender.java Thu 
Mar 13 19:04:13 2008
@@ -19,12 +19,7 @@
 //   Thomas Tuft Muller [EMAIL PROTECTED]
 package org.apache.log4j;
 
-import org.apache.log4j.helpers.AppenderAttachableImpl;
-import org.apache.log4j.spi.AppenderAttachable;
-import org.apache.log4j.spi.LoggingEvent;
-
 import java.text.MessageFormat;
-
 import java.util.ArrayList;
 import java.util.Enumeration;
 import java.util.HashMap;
@@ -32,6 +27,10 @@
 import java.util.List;
 import java.util.Map;
 
+import org.apache.log4j.helpers.AppenderAttachableImpl;
+import org.apache.log4j.spi.AppenderAttachable;
+import org.apache.log4j.spi.LoggingEvent;
+
 
 /**
  * The AsyncAppender lets users log events asynchronously.
@@ -119,7 +118,7 @@
 
 // set the dispatcher priority to lowest possible value
 //dispatcher.setPriority(Thread.MIN_PRIORITY);
-dispatcher.setName(Dispatcher- + dispatcher.getName());
+dispatcher.setName(AsyncAppender-Dispatcher- + dispatcher.getName());
 dispatcher.start();
   }
 

Modified: 
logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/FileWatchdog.java
URL: 
http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/FileWatchdog.java?rev=636954r1=636953r2=636954view=diff
==
--- 
logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/FileWatchdog.java 
(original)
+++ 
logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/FileWatchdog.java 
Thu Mar 13 19:04:13 2008
@@ -20,7 +20,6 @@
 package org.apache.log4j.helpers;
 
 import java.io.File;
-import org.apache.log4j.helpers.LogLog;
 
 /**
Check every now and then that a certain file has not changed. If it
@@ -52,6 +51,7 @@
 
   protected
   FileWatchdog(String filename) {
+super(FileWatchdog);
 this.filename = filename;
 file = new File(filename);
 setDaemon(true);

Modified: 
logging/log4j/trunk/src/main/java/org/apache/log4j/net/SimpleSocketServer.java
URL: 
http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/java/org/apache/log4j/net/SimpleSocketServer.java?rev=636954r1=636953r2=636954view=diff
==
--- 
logging/log4j/trunk/src/main/java/org/apache/log4j/net/SimpleSocketServer.java 
(original)
+++ 
logging/log4j/trunk/src/main/java/org/apache/log4j/net/SimpleSocketServer.java 
Thu Mar 13 19:04:13 2008
@@ -17,11 +17,11 @@
 
 package

svn commit: r634548 - in /logging/log4j/companions/zeroconf/trunk: ./ src/main/java/org/apache/log4j/net/ src/test/java/org/apache/log4j/net/

2008-03-06 Thread psmith
Author: psmith
Date: Thu Mar  6 22:07:58 2008
New Revision: 634548

URL: http://svn.apache.org/viewvc?rev=634548view=rev
Log:
Now that log4j 1.2.16 has the new createSocket method, we can trap this, store 
the details
of the port/address, and use that in the broadcast of what the 
SocketHubAppender is listening on.

Includes test case.  Changed dependency on zeroconf to require log4j 
1.2.16-SNAPSHOT until release.


Modified:
logging/log4j/companions/zeroconf/trunk/pom.xml

logging/log4j/companions/zeroconf/trunk/src/main/java/org/apache/log4j/net/ZeroConfSocketHubAppender.java

logging/log4j/companions/zeroconf/trunk/src/main/java/org/apache/log4j/net/Zeroconf4log4j.java

logging/log4j/companions/zeroconf/trunk/src/test/java/org/apache/log4j/net/ZeroConfSocketHubAppenderTest.java

Modified: logging/log4j/companions/zeroconf/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/logging/log4j/companions/zeroconf/trunk/pom.xml?rev=634548r1=634547r2=634548view=diff
==
--- logging/log4j/companions/zeroconf/trunk/pom.xml (original)
+++ logging/log4j/companions/zeroconf/trunk/pom.xml Thu Mar  6 22:07:58 2008
@@ -163,6 +163,7 @@
   /plugin 
  plugin
  artifactIdmaven-assembly-plugin/artifactId
+
  configuration
descriptors
   descriptorsrc/assembly/bin.xml/descriptor
@@ -171,6 +172,7 @@
 /configuration
 executions
 execution
+   phasepackage/phase
 goals
 goalassembly/goal
 /goals
@@ -181,6 +183,7 @@
 artifactIdmaven-javadoc-plugin/artifactId
 executions
 execution
+phasepackage/phase
 goals
 goaljar/goal
 goaljavadoc/goal
@@ -210,7 +213,7 @@
 dependency
   groupIdlog4j/groupId
   artifactIdlog4j/artifactId
-  version1.2.9/version
+  version1.2.16-SNAPSHOT/version
 /dependency
 dependency
   groupIdjmdns/groupId

Modified: 
logging/log4j/companions/zeroconf/trunk/src/main/java/org/apache/log4j/net/ZeroConfSocketHubAppender.java
URL: 
http://svn.apache.org/viewvc/logging/log4j/companions/zeroconf/trunk/src/main/java/org/apache/log4j/net/ZeroConfSocketHubAppender.java?rev=634548r1=634547r2=634548view=diff
==
--- 
logging/log4j/companions/zeroconf/trunk/src/main/java/org/apache/log4j/net/ZeroConfSocketHubAppender.java
 (original)
+++ 
logging/log4j/companions/zeroconf/trunk/src/main/java/org/apache/log4j/net/ZeroConfSocketHubAppender.java
 Thu Mar  6 22:07:58 2008
@@ -18,60 +18,74 @@
 
 import java.io.IOException;
 import java.lang.reflect.Method;
+import java.net.InetAddress;
+import java.net.ServerSocket;
 
 import javax.jmdns.JmDNS;
 import javax.jmdns.ServiceInfo;
 
 import org.apache.log4j.Level;
 
-
 /**
  * A sub-class of SocketHubAppender that broadcasts its configuration via 
Zeroconf.
  * 
  * This allows Zeroconf aware applications such as Chainsaw to be able to 
detect them, and automatically configure
  * themselves to be able to connect to them.
  * 
+ * This class relies on log4j 1.2.16 or later.
+ * 
  * @author psmith
  *
  */
 public class ZeroConfSocketHubAppender extends SocketHubAppender {
 
-public static final String DEFAULT_ZEROCONF_ZONE=_log4j._tcp.local.;
+public static final String DEFAULT_ZEROCONF_ZONE = _log4j._tcp.local.;
 private String zeroConfZone = DEFAULT_ZEROCONF_ZONE;
-
+
 private Object logger;
 private Method logInfoMethod;
 private Method logErrorMethod;
-
+
+private int actualPortUsed;
+private InetAddress actualAddressUsed;
+
 public ZeroConfSocketHubAppender() {
 setName(SocketHubAppender);
 try {
-Method getLoggerMethod = this.getClass().getMethod(getLogger, 
new Class[0]);
+Method getLoggerMethod = this.getClass().getMethod(getLogger,
+new Class[0]);
 logger = getLoggerMethod.invoke(this, new Object[0]);
-logInfoMethod = logger.getClass().getMethod(info, new Class[] 
{Object.class});
-logErrorMethod = logger.getClass().getMethod(error, new Class[] 
{Object.class});
-}catch(Exception e) {
+logInfoMethod = logger.getClass().getMethod(info,
+new Class[] { Object.class });
+logErrorMethod = logger.getClass().getMethod(error,
+new Class[] { Object.class });
+} catch (Exception e) {
 // we're not in log4j1.3 land
 }
 }
+
 public void activateOptions() {
 super.activateOptions();
-
 try {
 JmDNS jmDNS = Zeroconf4log4j.getInstance();
 ServiceInfo info = buildServiceInfo();
-logWithlog4j12Compatibility(Level.INFO,Registering

svn commit: r591552 - /logging/log4j/companions/receivers/trunk/src/main/java/org/apache/log4j/xml/XMLDecoder.java

2007-11-02 Thread psmith
Author: psmith
Date: Fri Nov  2 22:16:19 2007
New Revision: 591552

URL: http://svn.apache.org/viewvc?rev=591552view=rev
Log:
Bug 43736 applied patch provided by Curt with extraction to a constant to 
indicate that
XMLDecoder only deals with UTF-8 encoded log files.

Previously the system default encoding was being used to read in the XML file, 
even though
a header DOCTYPE pre-amble was added indicating the file was in UTF-8 encoding.

This is pretty much a stop gap fix for the time being.  At the moment there is 
no way in
Chainsaw to specify the encoding of the file about to be opened.

Modified:

logging/log4j/companions/receivers/trunk/src/main/java/org/apache/log4j/xml/XMLDecoder.java

Modified: 
logging/log4j/companions/receivers/trunk/src/main/java/org/apache/log4j/xml/XMLDecoder.java
URL: 
http://svn.apache.org/viewvc/logging/log4j/companions/receivers/trunk/src/main/java/org/apache/log4j/xml/XMLDecoder.java?rev=591552r1=591551r2=591552view=diff
==
--- 
logging/log4j/companions/receivers/trunk/src/main/java/org/apache/log4j/xml/XMLDecoder.java
 (original)
+++ 
logging/log4j/companions/receivers/trunk/src/main/java/org/apache/log4j/xml/XMLDecoder.java
 Fri Nov  2 22:16:19 2007
@@ -37,9 +37,9 @@
 import org.apache.log4j.Level;
 import org.apache.log4j.Logger;
 import org.apache.log4j.spi.Decoder;
+import org.apache.log4j.spi.LocationInfo;
 import org.apache.log4j.spi.LoggingEvent;
 import org.apache.log4j.spi.ThrowableInformation;
-import org.apache.log4j.spi.LocationInfo;
 import org.w3c.dom.Document;
 import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
@@ -56,17 +56,23 @@
  * NOTE:  Only a single LoggingEvent is returned from the decode method
  * even though the DTD supports multiple events nested in an eventSet.
  *
- *
+ * NOTE: This class has been created on the assumption that all XML log files
+ * are encoding in UTF-8 encoding. There is no current support for any other 
+ * encoding format at this time.
+ * 
  * @author Scott Deboy ([EMAIL PROTECTED])
  * @author Paul Smith ([EMAIL PROTECTED])
  *
  */
 public class XMLDecoder implements Decoder {
+
+  private static final String ENCODING = UTF-8;
+
 /**
  * Document prolog.
  */
   private static final String BEGINPART =
-?xml version=\1.0\ encoding=\UTF-8\ ?
+?xml version=\1.0\ encoding=\ + ENCODING + \ ?
 + !DOCTYPE log4j:eventSet SYSTEM \http://localhost/log4j.dtd\;
 + log4j:eventSet version=\1.2\ 
 + xmlns:log4j=\http://jakarta.apache.org/log4j/\;;
@@ -183,9 +189,9 @@
 if (owner != null) {
   reader = new LineNumberReader(new InputStreamReader(
   new ProgressMonitorInputStream(owner,
-  Loading  + url , url.openStream(;
+  Loading  + url , url.openStream()), ENCODING));
 } else {
-  reader = new LineNumberReader(new InputStreamReader(url.openStream()));
+  reader = new LineNumberReader(new InputStreamReader(url.openStream(), 
ENCODING));
 }
 
 Vector v = new Vector();



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r589940 - in /logging/sandbox/jul-to-log4j-bridge/src: main/java/org/apache/logging/julbridge/ test/java/org/apache/log4j/jul/ test/java/org/apache/logging/julbridge/

2007-10-29 Thread psmith
Author: psmith
Date: Mon Oct 29 19:28:20 2007
New Revision: 589940

URL: http://svn.apache.org/viewvc?rev=589940view=rev
Log:
Fixed a bug found by Joshua ChaitinPollack where LoggingEvents were being 
posted to the matching
log4j Logger without obeying the configured thresholds defined for that logger.

This is inline with what the Receiver class does.

Added test case based on test harness code provided by Joshua, slightly 
massaged to fit
within the unit test infrastructure.

Added:

logging/sandbox/jul-to-log4j-bridge/src/test/java/org/apache/log4j/jul/JULBridgeTestUtils.java

logging/sandbox/jul-to-log4j-bridge/src/test/java/org/apache/logging/julbridge/AssimilatedLevelTest.java
Modified:

logging/sandbox/jul-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/JULBridgeHandler.java

logging/sandbox/jul-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/JULLog4jBridge.java

logging/sandbox/jul-to-log4j-bridge/src/test/java/org/apache/log4j/jul/JULReceiverTest.java

Modified: 
logging/sandbox/jul-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/JULBridgeHandler.java
URL: 
http://svn.apache.org/viewvc/logging/sandbox/jul-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/JULBridgeHandler.java?rev=589940r1=589939r2=589940view=diff
==
--- 
logging/sandbox/jul-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/JULBridgeHandler.java
 (original)
+++ 
logging/sandbox/jul-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/JULBridgeHandler.java
 Mon Oct 29 19:28:20 2007
@@ -13,41 +13,45 @@
 import java.util.logging.Handler;
 import java.util.logging.LogRecord;
 
+import org.apache.log4j.Category;
 import org.apache.log4j.Logger;
 import org.apache.log4j.spi.LoggerRepository;
 import org.apache.log4j.spi.LoggingEvent;
 
-
 /**
- * An implementation of [EMAIL PROTECTED] Handler} that converts the [EMAIL 
PROTECTED] LogRecord}
- * into a [EMAIL PROTECTED] LoggingEvent} and posts it to a duplicately named
- * [EMAIL PROTECTED] Logger} in the log4j system.
+ * An implementation of [EMAIL PROTECTED] Handler} that converts the [EMAIL 
PROTECTED] LogRecord} into
+ * a [EMAIL PROTECTED] LoggingEvent} and posts it to a duplicately named 
[EMAIL PROTECTED] Logger} in
+ * the log4j system.
  * 
  * @author psmith
- *
+ * 
  */
-class JULBridgeHandler extends Handler{
+class JULBridgeHandler extends Handler {
 
 private final LoggerRepository repository;
 private final JULLog4jEventConverter converter;
-
-public JULBridgeHandler(LoggerRepository repository, 
JULLog4jEventConverter converter) {
+
+public JULBridgeHandler(LoggerRepository repository,
+JULLog4jEventConverter converter) {
 this.repository = repository;
 this.converter = converter;
 }
-
 
 public void close() throws SecurityException {
-
+
 }
 
 public void flush() {
-
+
 }
 
 public void publish(LogRecord record) {
 LoggingEvent event = converter.convert(record);
-repository.getLogger(record.getLoggerName()).callAppenders(event);
+
+Category localLogger = repository.getLogger(record.getLoggerName());
+if 
(event.getLevel().isGreaterOrEqual(localLogger.getEffectiveLevel())) {
+localLogger.callAppenders(event);
+}
 }
 
 }

Modified: 
logging/sandbox/jul-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/JULLog4jBridge.java
URL: 
http://svn.apache.org/viewvc/logging/sandbox/jul-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/JULLog4jBridge.java?rev=589940r1=589939r2=589940view=diff
==
--- 
logging/sandbox/jul-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/JULLog4jBridge.java
 (original)
+++ 
logging/sandbox/jul-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/JULLog4jBridge.java
 Mon Oct 29 19:28:20 2007
@@ -20,37 +20,42 @@
 
 /**
  * p
- * Helper class that creates bridge filters between java.util.logging.Loggers 
and an equivalent
- * log4j Logger.
+ * Helper class that creates bridge filters between java.util.logging.Loggers
+ * and an equivalent log4j Logger.
  * /p
  * p
- * The codebridge/code-style method calls use a [EMAIL PROTECTED] Filter} 
implementation that tries to
- * minimise interference with the existing codejava.util.logging/code 
configuration, but can
- * only bridge specific named loggers, and is not able to bridge child loggers 
automatically. Any
- * Logger that is bridged that contains an existing Filter instance is 
delegated to when deciding if
- * the LogRecord should continue in the java.util.logging framework, even 
though the bridge posts
- * the LogRecord into log4j regardless. If there was no existing Filter 
defined for the bridged
- * Logger, then the bridging Filter returns 'true' to mimic the default 
behaviour of not having

svn commit: r567945 - /logging/log4j/companions/receivers/trunk/src/main/java/org/apache/log4j/xml/LogFileXMLReceiver.java

2007-08-20 Thread psmith
Author: psmith
Date: Mon Aug 20 21:26:42 2007
New Revision: 567945

URL: http://svn.apache.org/viewvc?rev=567945view=rev
Log:
Added 'useCurrentThread' property to this receiver.  This is the same as the 
other Log-file based receiver.

Chainsaw requires a background thread to process events, but other uses of 
these receivers may wish to 
wait for all logs to be imported before moving on to another stage.

This purely makes this class consistent with the other receiver.

Modified:

logging/log4j/companions/receivers/trunk/src/main/java/org/apache/log4j/xml/LogFileXMLReceiver.java

Modified: 
logging/log4j/companions/receivers/trunk/src/main/java/org/apache/log4j/xml/LogFileXMLReceiver.java
URL: 
http://svn.apache.org/viewvc/logging/log4j/companions/receivers/trunk/src/main/java/org/apache/log4j/xml/LogFileXMLReceiver.java?rev=567945r1=567944r2=567945view=diff
==
--- 
logging/log4j/companions/receivers/trunk/src/main/java/org/apache/log4j/xml/LogFileXMLReceiver.java
 (original)
+++ 
logging/log4j/companions/receivers/trunk/src/main/java/org/apache/log4j/xml/LogFileXMLReceiver.java
 Mon Aug 20 21:26:42 2007
@@ -1,17 +1,10 @@
 /*
- * Copyright 1999,2004 The Apache Software Foundation.
- * 
- * Licensed under the Apache License, Version 2.0 (the License); you may not
- * use this file except in compliance with the License. You may obtain a copy 
of
- * the License at
- * 
- *  http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations 
under
- * the License.
+ * Copyright 1999,2004 The Apache Software Foundation. Licensed under the 
Apache License, Version
+ * 2.0 (the License); you may not use this file except in compliance with 
the License. You may
+ * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 
Unless required by
+ * applicable law or agreed to in writing, software distributed under the 
License is distributed on
+ * an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 
express or implied. See
+ * the License for the specific language governing permissions and limitations 
under the License.
  */
 
 package org.apache.log4j.xml;
@@ -34,253 +27,276 @@
 import org.apache.log4j.spi.LoggingEvent;
 
 /**
-LogFileXMLReceiver will read an xml-formated log file and make the events in 
the log 
-file available to the log4j framework.  
-
-pThis receiver supports log files created using log4j's XMLLayout, as well 
as 
-java.util.logging XMLFormatter (via the org.apache.log4j.spi.Decoder 
interface).
-
-pBy default, log4j's XMLLayout is supported (no need to specify a decoder in 
that case).
-
-pTo configure this receiver to support java.util.logging's XMLFormatter, 
specify a
-'decoder' param of org.apache.log4j.xml.UtilLoggingXMLDecoder.
-
-pTailing -may- work, but not in all cases (try using a file:// URL).  If a 
process has a log file open,
-the receiver may be able to read and tail the file.  If the process closes the 
file and reopens the file, 
-the receiver may not be able to continue tailing the file.
-
-pAn expressionFilter may be specified.  Only events passing the expression 
will be forwarded to the log4j framework.
-
-pOnce the event has been posted, it will be handled by the
-appenders currently configured in the LoggerRespository.
-
[EMAIL PROTECTED] Scott Deboy [EMAIL PROTECTED]
-
-*/
+ * LogFileXMLReceiver will read an xml-formated log file and make the events 
in the log file
+ * available to the log4j framework.
+ * p
+ * This receiver supports log files created using log4j's XMLLayout, as well 
as java.util.logging
+ * XMLFormatter (via the org.apache.log4j.spi.Decoder interface).
+ * p
+ * By default, log4j's XMLLayout is supported (no need to specify a decoder in 
that case).
+ * p
+ * To configure this receiver to support java.util.logging's XMLFormatter, 
specify a 'decoder' param
+ * of org.apache.log4j.xml.UtilLoggingXMLDecoder.
+ * p
+ * Tailing -may- work, but not in all cases (try using a file:// URL). If a 
process has a log file
+ * open, the receiver may be able to read and tail the file. If the process 
closes the file and
+ * reopens the file, the receiver may not be able to continue tailing the file.
+ * p
+ * An expressionFilter may be specified. Only events passing the expression 
will be forwarded to the
+ * log4j framework.
+ * p
+ * Once the event has been posted, it will be handled by the appenders 
currently configured in the
+ * LoggerRespository.
+ * 
+ * @author Scott Deboy [EMAIL PROTECTED]
+ * @since 1.3
+ */
 
 public class LogFileXMLReceiver extends Receiver {
-   private String fileURL;
-   private Rule expressionRule;
-   private String

svn commit: r554458 - in /logging/sandbox/jul-to-log4j-bridge: pom.xml src/changes/changes.xml src/site/apt/keyclasses.apt

2007-07-08 Thread psmith
Author: psmith
Date: Sun Jul  8 15:24:24 2007
New Revision: 554458

URL: http://svn.apache.org/viewvc?view=revrev=554458
Log:
* Updated documentation to include the JULAppender.
* Added reference to changes.xml to credit Sagi Mann for the JULAppender.
* Tweaks to site.

Modified:
logging/sandbox/jul-to-log4j-bridge/pom.xml
logging/sandbox/jul-to-log4j-bridge/src/changes/changes.xml
logging/sandbox/jul-to-log4j-bridge/src/site/apt/keyclasses.apt

Modified: logging/sandbox/jul-to-log4j-bridge/pom.xml
URL: 
http://svn.apache.org/viewvc/logging/sandbox/jul-to-log4j-bridge/pom.xml?view=diffrev=554458r1=554457r2=554458
==
--- logging/sandbox/jul-to-log4j-bridge/pom.xml (original)
+++ logging/sandbox/jul-to-log4j-bridge/pom.xml Sun Jul  8 15:24:24 2007
@@ -1,131 +1,141 @@
 ?xml version=1.0 encoding=UTF-8?
 project xmlns=http://maven.apache.org/POM/4.0.0; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd;
-   modelVersion4.0.0/modelVersion
-   groupIdorg.apache.logging/groupId
-   namejava.util.logging to log4j Bridge/name
-   artifactIdapache-jul-log4j-bridge/artifactId
-   version1.0.0-SNAPSHOT/version
-   descriptionBridge JDK 1.4+ java.util.Logging to Apache 
log4j/description
-   urlhttp://logging.apache.org/log4j/url
-   issueManagement
-   systemBugzilla/system
-   urlhttp://issues.apache.org/bugzilla/url
-   /issueManagement
-   ciManagement
-   systemGump/system
-   
urlhttp://vmgump.apache.org/gump/public/logging-log4j-bridge/logging-log4j-bridge/index.html/url
-   /ciManagement
-   inceptionYear2007/inceptionYear
-   mailingLists
-   mailingList
-   namelog4j-user/name
-   subscribe[EMAIL PROTECTED]/subscribe
-   unsubscribe[EMAIL PROTECTED]/unsubscribe
-   post[EMAIL PROTECTED]/post
-   
archivehttp://mail-archives.apache.org/mod_mbox/logging-log4j-dev//archive
-   otherArchives
-   
otherArchivehttp://marc.theaimsgroup.com/?l=log4j-useramp;r=1amp;w=2/otherArchive
-   
otherArchivehttp://dir.gmane.org/gmane.comp.jakarta.log4j.user/otherArchive
-   /otherArchives
-   /mailingList
-   mailingList
-   namelog4j-dev/name
-   subscribe[EMAIL PROTECTED]/subscribe
-   unsubscribe[EMAIL PROTECTED]/unsubscribe
-   postlog4j-dev@logging.apache.org/post
-   
archivehttp://mail-archives.apache.org/mod_mbox/logging-log4j-dev//archive
-   otherArchives
-   
otherArchivehttp://marc.theaimsgroup.com/?l=log4j-devamp;r=1amp;w=2/otherArchive
-   
otherArchivehttp://dir.gmane.org/gmane.comp.jakarta.log4j.devel/otherArchive
-   /otherArchives
-   /mailingList
-   /mailingLists
-   developers
-   developer
-   idmwomack/id
-   nameMark Womack/name
-   email[EMAIL PROTECTED]/email
-   /developer
-   developer
-   idcarnold/id
-   nameCurt Arnold/name
-   email[EMAIL PROTECTED]/email
-   /developer
-   developer
-   idsdeboy/id
-   nameScott Deboy/name
-   email[EMAIL PROTECTED]/email
-   /developer
-   developer
-   idpsmith/id
-   namePaul Smith/name
-   email[EMAIL PROTECTED]/email
-   /developer
-   /developers
-   licenses
-   license
-   nameApache License, Version 2.0/name
-   
urlhttp://www.apache.org/licenses/LICENSE-2.0.txt/url
-   distributionrepo/distribution
-   /license
-   /licenses
-   scm
-   
connectionscm:svn:http://svn.apache.org/repos/asf/logging/sandbox/jul-to-log4j-bridge/connection
-   
developerConnectionscm:svn:https://svn.apache.org/repos/asf/logging/sandbox/jul-to-log4j-bridge/developerConnection
-   
urlhttp://svn.apache.org/viewcvs.cgi/logging/sandbox/jul-to-log4j-bridge/url
-   /scm
-   organization
-   nameApache Software Foundation/name
-   urlhttp://www.apache.org/url
-   /organization
-   build
-   plugins
-   plugin
-   artifactIdmaven-checkstyle-plugin/artifactId

svn commit: r550391 - in /logging/sandbox/jul-to-log4j-bridge/src: main/java/org/apache/log4j/jul/ test/java/org/apache/log4j/jul/

2007-06-25 Thread psmith
Author: psmith
Date: Sun Jun 24 23:59:19 2007
New Revision: 550391

URL: http://svn.apache.org/viewvc?view=revrev=550391
Log:
Bug 42664 Addition of JULAppender provided by Sagin Mann.

* package structure changed slightly
* Mapping of jul-log4j levels handled by the JULLevelConverter interface 
structure

NOTE: one test is currently failing under maven, but all tests appear to pass 
in Eclipse 
(even when run as a group).



Added:

logging/sandbox/jul-to-log4j-bridge/src/main/java/org/apache/log4j/jul/JULAppender.java

logging/sandbox/jul-to-log4j-bridge/src/test/java/org/apache/log4j/jul/AssertionHandler.java

logging/sandbox/jul-to-log4j-bridge/src/test/java/org/apache/log4j/jul/JULAppenderCustomLevelTest.java

logging/sandbox/jul-to-log4j-bridge/src/test/java/org/apache/log4j/jul/JULAppenderTest.java

Added: 
logging/sandbox/jul-to-log4j-bridge/src/main/java/org/apache/log4j/jul/JULAppender.java
URL: 
http://svn.apache.org/viewvc/logging/sandbox/jul-to-log4j-bridge/src/main/java/org/apache/log4j/jul/JULAppender.java?view=autorev=550391
==
--- 
logging/sandbox/jul-to-log4j-bridge/src/main/java/org/apache/log4j/jul/JULAppender.java
 (added)
+++ 
logging/sandbox/jul-to-log4j-bridge/src/main/java/org/apache/log4j/jul/JULAppender.java
 Sun Jun 24 23:59:19 2007
@@ -0,0 +1,225 @@
+/*
+ * Copyright 1999-2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.log4j.jul;
+
+import org.apache.log4j.helpers.LogLog;
+import org.apache.log4j.spi.LoggingEvent;
+import org.apache.log4j.AppenderSkeleton;
+import org.apache.log4j.Layout;
+import org.apache.log4j.Level;
+import org.apache.logging.julbridge.JULLevelConverter;
+import org.apache.logging.julbridge.JULLog4jEventConverter;
+
+/**
+ * A Log4j appender for Java Logging API (aka JUL). This appender allows
+ * existing log4j-enabled applications running inside a JUL-enabled environment
+ * (like an application server) to correctly log events in the proper log level
+ * and JUL format.br
+ * br
+ * The need for this appender comes from several facts:br
+ * br
+ * 
+ * 1. JUL alone does not provide features like layouts, patterns, NDC, etc; so
+ * using JUL takes away important features from developers.br
+ * br
+ * 
+ * 2. Log4j alone does not correctly map Log4j log levels to JUL levels. The
+ * best one can do at the moment is use the all-purpose ConsoleAppender, which
+ * causes all log4j events to appear as either INFO or WARNING, depending on 
the
+ * appender's target (out/err) and NOT depending on the logging method
+ * (debug/trace/error/etc). Proper mapping to JUL levels (INFO, FINE, FINEST,
+ * etc) is expected to depend on the logging method being called.br
+ * br
+ * 
+ * 3. The fact that there is no appropriate log4j-JUL level mapping also means
+ * that the JUL environment mistreats events generated by the application; for
+ * example, the administrator's level-dependent rules may mistreat log4j 
events,
+ * or a simple query for all FATAL-level events using standard JUL interfaces
+ * would not show log4j events, making maintenance and troubleshooting
+ * difficult.br
+ * br
+ * 
+ * This appender effectively satisfies those needs:br
+ * br
+ * 
+ * 1. It fully supports layouts like ConsoleAppenderbr
+ * br
+ * 
+ * 2. It appropriately maps Log4j-levels to JUL levels, depending on the 
logging
+ * method being called. The mapping is as follows (log4j -- JUL):br
+ * all -- ALLbr
+ * trace -- FINERbr
+ * debug -- FINEbr
+ * info -- INFObr
+ * warn -- WARNINGbr
+ * error -- SEVEREbr
+ * fatal -- SEVEREbr
+ * br
+ * Note: there is no *standard* JUL level between WARNING and SEVERE, so both
+ * error and fatal log4j events are mapped to SEVERE.br
+ * br
+ * 
+ * Usage and configuration is identical to using the [EMAIL PROTECTED] 
ConsoleAppener}.
+ * Any application currently configured to use the ConsoleAppender, and wishes
+ * to switch to JulAppender simply has to replace ConsoleAppender with
+ * JulAppender in its log4j configuration; for example:br
+ * br
+ * tt
+ * log4j.appender.julAppender=org.apache.log4j.JulAppender
+ * log4j.appender.julAppender.layout=org.apache.log4j.PatternLayout
+ * log4j.appender.julAppender.layout.ConversionPattern=%d %-5p %c - %m%n
+ * /ttbr
+ * br
+ * It may even be sensible to reduce the number of elements in the pattern 
since
+ * JUL usually provides some

svn commit: r549242 - in /logging/sandbox/jul-to-log4j-bridge: pom.xml src/main/java/org/apache/logging/julbridge/JULLog4jBridge.java src/test/java/org/apache/log4j/jul/JULReceiverTest.java src/test/j

2007-06-20 Thread psmith
Author: psmith
Date: Wed Jun 20 14:26:06 2007
New Revision: 549242

URL: http://svn.apache.org/viewvc?view=revrev=549242
Log:
Fix for test cases breaking under Maven AND Eclipse.

Turns out that a failing test works fine by itself but not in conjunction with 
the other tests
running because an Filter is left configured in the JUL system, DESPITE it's
LogManager.reset() being called.  

One has to manually remove all the registered filters even if calling reset().  
That's not much of a reset()
method if you ask me.

The fix makes sure that each unit test tears down the JUL configuration 
correctly before the next test case
runs.


Modified:
logging/sandbox/jul-to-log4j-bridge/pom.xml

logging/sandbox/jul-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/JULLog4jBridge.java

logging/sandbox/jul-to-log4j-bridge/src/test/java/org/apache/log4j/jul/JULReceiverTest.java

logging/sandbox/jul-to-log4j-bridge/src/test/java/org/apache/logging/julbridge/TestLogPosting.java

Modified: logging/sandbox/jul-to-log4j-bridge/pom.xml
URL: 
http://svn.apache.org/viewvc/logging/sandbox/jul-to-log4j-bridge/pom.xml?view=diffrev=549242r1=549241r2=549242
==
--- logging/sandbox/jul-to-log4j-bridge/pom.xml (original)
+++ logging/sandbox/jul-to-log4j-bridge/pom.xml Wed Jun 20 14:26:06 2007
@@ -146,11 +146,6 @@
   groupIdorg.codehaus.mojo/groupId
   artifactIdjxr-maven-plugin/artifactId
   /plugin
-   plugin 
-   groupIdorg.codehaus.mojo/groupId 
-   artifactIdcobertura-maven-plugin/artifactId
-   version2.0/version
-   /plugin 
   plugin
 artifactIdmaven-changes-plugin/artifactId
 configuration

Modified: 
logging/sandbox/jul-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/JULLog4jBridge.java
URL: 
http://svn.apache.org/viewvc/logging/sandbox/jul-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/JULLog4jBridge.java?view=diffrev=549242r1=549241r2=549242
==
--- 
logging/sandbox/jul-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/JULLog4jBridge.java
 (original)
+++ 
logging/sandbox/jul-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/JULLog4jBridge.java
 Wed Jun 20 14:26:06 2007
@@ -10,6 +10,7 @@
  */
 package org.apache.logging.julbridge;
 
+import java.util.Enumeration;
 import java.util.logging.Filter;
 import java.util.logging.Level;
 
@@ -119,10 +120,16 @@
 /**
  * Reverse of [EMAIL PROTECTED] #assimilate()}, disconnects the bridge
  * from the java.util.logging subsystem by resetting that framework
- * back to it's default configuration.
+ * back to it's default configuration (removes all Handlers and Filters)
  */
 public static void repatriate() {
-java.util.logging.LogManager.getLogManager().reset();
+
+java.util.logging.LogManager logManager = 
java.util.logging.LogManager.getLogManager();
+Enumeration loggerNames = logManager.getLoggerNames();
+while(loggerNames.hasMoreElements()) {
+
logManager.getLogger(loggerNames.nextElement().toString()).setFilter(null);
+}
+logManager.reset();
 
 }
 

Modified: 
logging/sandbox/jul-to-log4j-bridge/src/test/java/org/apache/log4j/jul/JULReceiverTest.java
URL: 
http://svn.apache.org/viewvc/logging/sandbox/jul-to-log4j-bridge/src/test/java/org/apache/log4j/jul/JULReceiverTest.java?view=diffrev=549242r1=549241r2=549242
==
--- 
logging/sandbox/jul-to-log4j-bridge/src/test/java/org/apache/log4j/jul/JULReceiverTest.java
 (original)
+++ 
logging/sandbox/jul-to-log4j-bridge/src/test/java/org/apache/log4j/jul/JULReceiverTest.java
 Wed Jun 20 14:26:06 2007
@@ -20,6 +20,8 @@
 import java.util.Iterator;
 import java.util.List;
 
+import junit.framework.TestCase;
+
 import org.apache.log4j.LogManager;
 import org.apache.log4j.Logger;
 import org.apache.log4j.LoggerRepositoryExImpl;
@@ -27,10 +29,9 @@
 import org.apache.log4j.spi.LoggerRepository;
 import org.apache.log4j.spi.LoggingEvent;
 import org.apache.log4j.spi.RepositorySelector;
+import org.apache.logging.julbridge.JULLog4jBridge;
 import org.apache.logging.julbridge.MockAppender;
 
-import junit.framework.TestCase;
-
 public class JULReceiverTest extends TestCase {
 
 private final Object repositorySelectorGuard = new Object();
@@ -40,6 +41,7 @@
 
 protected void setUp() throws Exception {
 super.setUp();
+java.util.logging.LogManager.getLogManager().reset();
 mockAppender = new MockAppender();
 LogManager.resetConfiguration();
 LogManager.setRepositorySelector(new RepositorySelector() {
@@ -52,6 +54,7 @@
 
 protected void tearDown() throws Exception {
 super.tearDown();
+JULLog4jBridge.repatriate

svn commit: r549274 - in /logging/sandbox/jul-to-log4j-bridge: README.txt pom.xml src/changes/changes.xml src/site/apt/ src/site/apt/examples.apt src/site/apt/intro.apt src/site/apt/keyclasses.apt src

2007-06-20 Thread psmith
Author: psmith
Date: Wed Jun 20 15:11:04 2007
New Revision: 549274

URL: http://svn.apache.org/viewvc?view=revrev=549274
Log:
Tidied up site and documentation.


Added:
logging/sandbox/jul-to-log4j-bridge/src/site/apt/
logging/sandbox/jul-to-log4j-bridge/src/site/apt/examples.apt
logging/sandbox/jul-to-log4j-bridge/src/site/apt/intro.apt
logging/sandbox/jul-to-log4j-bridge/src/site/apt/keyclasses.apt
Modified:
logging/sandbox/jul-to-log4j-bridge/README.txt
logging/sandbox/jul-to-log4j-bridge/pom.xml
logging/sandbox/jul-to-log4j-bridge/src/changes/changes.xml
logging/sandbox/jul-to-log4j-bridge/src/site/site.xml

Modified: logging/sandbox/jul-to-log4j-bridge/README.txt
URL: 
http://svn.apache.org/viewvc/logging/sandbox/jul-to-log4j-bridge/README.txt?view=diffrev=549274r1=549273r2=549274
==
--- logging/sandbox/jul-to-log4j-bridge/README.txt (original)
+++ logging/sandbox/jul-to-log4j-bridge/README.txt Wed Jun 20 15:11:04 2007
@@ -1,35 +1,9 @@
+Apache Logging Services - java.util.logging-log4j Bridge
+
 Bridging support between the java.util.logging (JUL) framework and log4j.
 
 Requirements: JDK 1.4+, and log4j 1.2.15 
 
 This library will not work with log4j 1.2.14 or earlier.
 
-Key classes:
-
-   * org.apache.logging.julbridge.JULLog4jBridge - main entry point to 
configure a bridge
-   * org.apache.logging.julbridge.JULLevelConverter - Because the JUL 
Level classes are quite different
- this converter interface performs the mapping into the log4j Level 
space.  In
- many cases you can use a default converter.
-   
-Example 1 - Completely take over JUL and route all LogRecords into log4j 
-
-   
-   JULLog4jBridge.assimilate();
-
-Example 2 - As (1), but using log4j XML configuration 
-
-
-   log4j:configuration xmlns:log4j=http://jakarta.apache.org/log4j/; 
debug=true
-  plugin name=julreceiver class=org.apache.log4j.jul.JULReceiver 
/
-  ..
-   /log4j:configuration
-
-Example 2 - Bridge a single JUL Logger
-===
-
-   JULLog4jBridge.bridgeJULLogger(foo);
-
-   This bridges all events posted to the 'foo' logger into log4j's Logger 
called 'foo'.
-
-   NOTE: this does NOT automatically bridge child Loggers.  
-
+Please read the documentation found in src/site/apt/.  
\ No newline at end of file

Modified: logging/sandbox/jul-to-log4j-bridge/pom.xml
URL: 
http://svn.apache.org/viewvc/logging/sandbox/jul-to-log4j-bridge/pom.xml?view=diffrev=549274r1=549273r2=549274
==
--- logging/sandbox/jul-to-log4j-bridge/pom.xml (original)
+++ logging/sandbox/jul-to-log4j-bridge/pom.xml Wed Jun 20 15:11:04 2007
@@ -2,8 +2,9 @@
 project xmlns=http://maven.apache.org/POM/4.0.0; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd;
   modelVersion4.0.0/modelVersion
   groupIdorg.apache.logging/groupId
-  artifactIdapache-juli-log4j-bridge/artifactId
-  version0.1.0/version
+  namejava.util.logging to log4j Bridge/name
+  artifactIdapache-jul-log4j-bridge/artifactId
+  version1.0.0-SNAPSHOT/version
   descriptionBridge JDK 1.4+ java.util.Logging to Apache log4j/description
   urlhttp://logging.apache.org/log4j/url
 issueManagement
@@ -69,9 +70,9 @@
/license
 /licenses
 scm
-   
connectionscm:svn:http://svn.apache.org/repos/asf/logging/sandbox/juli-log4j-bridge/connection
-   
developerConnectionscm:svn:https://svn.apache.org/repos/asf/logging/sandbox/juli-log4j-bridge/developerConnection
-   
urlhttp://svn.apache.org/viewcvs.cgi/logging/sandbox/juli-logging-bridge/url
+   
connectionscm:svn:http://svn.apache.org/repos/asf/logging/sandbox/jul-to-log4j-bridge/connection
+   
developerConnectionscm:svn:https://svn.apache.org/repos/asf/logging/sandbox/jul-to-log4j-bridge/developerConnection
+   
urlhttp://svn.apache.org/viewcvs.cgi/logging/sandbox/jul-to-log4j-bridge/url
 /scm
 organization
 nameApache Software Foundation/name
@@ -85,7 +86,7 @@
   dependency
 groupIdlog4j/groupId
 artifactIdlog4j/artifactId
-version1.2.15/version
+version1.2.14/version
   /dependency
 /dependencies
   /plugin

Modified: logging/sandbox/jul-to-log4j-bridge/src/changes/changes.xml
URL: 
http://svn.apache.org/viewvc/logging/sandbox/jul-to-log4j-bridge/src/changes/changes.xml?view=diffrev=549274r1=549273r2=549274
==
--- logging/sandbox/jul-to-log4j-bridge/src/changes/changes.xml (original)
+++ logging/sandbox/jul-to-log4j-bridge/src

svn commit: r549361 - /logging/sandbox/jul-to-log4j-bridge/pom.xml

2007-06-20 Thread psmith
Author: psmith
Date: Wed Jun 20 21:35:38 2007
New Revision: 549361

URL: http://svn.apache.org/viewvc?view=revrev=549361
Log:
Added bundling of javadoc and source code to the maven artifacts.

Thanks to Curt for the info on this one.



Modified:
logging/sandbox/jul-to-log4j-bridge/pom.xml

Modified: logging/sandbox/jul-to-log4j-bridge/pom.xml
URL: 
http://svn.apache.org/viewvc/logging/sandbox/jul-to-log4j-bridge/pom.xml?view=diffrev=549361r1=549360r2=549361
==
--- logging/sandbox/jul-to-log4j-bridge/pom.xml (original)
+++ logging/sandbox/jul-to-log4j-bridge/pom.xml Wed Jun 20 21:35:38 2007
@@ -126,6 +126,27 @@
/executions
/configuration
/plugin
+   plugin
+  artifactIdmaven-javadoc-plugin/artifactId
+  executions
+  execution
+  goals
+  goaljar/goal
+  goaljavadoc/goal
+  /goals
+  /execution
+  /executions
+/plugin
+plugin
+  artifactIdmaven-source-plugin/artifactId
+  executions
+  execution
+  goals
+  goaljar/goal
+  /goals
+  /execution
+  /executions
+/plugin
/plugins
/build
dependencies



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r548189 - /logging/log4j/companions/receivers/trunk/src/main/java/org/apache/log4j/varia/LogFilePatternReceiver.java

2007-06-17 Thread psmith
Author: psmith
Date: Sun Jun 17 20:30:49 2007
New Revision: 548189

URL: http://svn.apache.org/viewvc?view=revrev=548189
Log:
Adds an option that determines whether a new thread, or the existing thread
is used to import the events into the Receiver. By default the behaviour remains
unchanged with a new Thread created to manage the import.

The new Thread that is created has a custom Thread name to differentiate it 
from other threads.


Modified:

logging/log4j/companions/receivers/trunk/src/main/java/org/apache/log4j/varia/LogFilePatternReceiver.java

Modified: 
logging/log4j/companions/receivers/trunk/src/main/java/org/apache/log4j/varia/LogFilePatternReceiver.java
URL: 
http://svn.apache.org/viewvc/logging/log4j/companions/receivers/trunk/src/main/java/org/apache/log4j/varia/LogFilePatternReceiver.java?view=diffrev=548189r1=548188r2=548189
==
--- 
logging/log4j/companions/receivers/trunk/src/main/java/org/apache/log4j/varia/LogFilePatternReceiver.java
 (original)
+++ 
logging/log4j/companions/receivers/trunk/src/main/java/org/apache/log4j/varia/LogFilePatternReceiver.java
 Sun Jun 17 20:30:49 2007
@@ -192,6 +192,8 @@
   private Reader reader;
   private String timestampPatternText;
 
+private boolean useCurrentThread;
+
   public LogFilePatternReceiver() {
 keywords.add(TIMESTAMP);
 keywords.add(LOGGER);
@@ -800,7 +802,7 @@
* Read and process the log file.
*/
   public void activateOptions() {
-new Thread(new Runnable() {
+Runnable runnable = new Runnable() {
   public void run() {
 initialize();
 while (reader == null) {
@@ -826,6 +828,31 @@
   getLogger().info(stream closed);
 }
   }
-}).start();
+};
+if(useCurrentThread) {
+runnable.run();
+}else {
+new Thread(runnable, LogFilePatternReceiver-+getName()).start();
+}
   }
+
+ /**
+  * When true, this property uses the current Thread to perform the import,
+  * otherwise when false (the default), a new Thread is created and 
started to manage
+  * the import.
+  * @return
+  */ 
+public final boolean isUseCurrentThread() {
+return useCurrentThread;
+}
+
+/**
+ * Sets whether the current Thread or a new Thread is created to perform 
the import,
+ * the default being false (new Thread created).
+ * 
+ * @param useCurrentThread
+ */
+public final void setUseCurrentThread(boolean useCurrentThread) {
+this.useCurrentThread = useCurrentThread;
+}
 }



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r546008 - in /logging/log4j/companions/zeroconf: ./ trunk/ trunk/src/ trunk/src/main/ trunk/src/main/java/ trunk/src/main/java/org/ trunk/src/main/java/org/apache/ trunk/src/main/java/org/

2007-06-10 Thread psmith
Author: psmith
Date: Sun Jun 10 22:09:57 2007
New Revision: 546008

URL: http://svn.apache.org/viewvc?view=revrev=546008
Log:
Adding basic project structure for the log4j-zeroconf companion module.



Added:
logging/log4j/companions/zeroconf/
logging/log4j/companions/zeroconf/trunk/
logging/log4j/companions/zeroconf/trunk/LICENSE
logging/log4j/companions/zeroconf/trunk/NOTICE
logging/log4j/companions/zeroconf/trunk/pom.xml
logging/log4j/companions/zeroconf/trunk/src/
logging/log4j/companions/zeroconf/trunk/src/main/
logging/log4j/companions/zeroconf/trunk/src/main/java/
logging/log4j/companions/zeroconf/trunk/src/main/java/org/
logging/log4j/companions/zeroconf/trunk/src/main/java/org/apache/
logging/log4j/companions/zeroconf/trunk/src/main/java/org/apache/log4j/
logging/log4j/companions/zeroconf/trunk/src/test/
logging/log4j/companions/zeroconf/trunk/src/test/java/
logging/log4j/companions/zeroconf/trunk/src/test/java/log4j/
logging/log4j/companions/zeroconf/trunk/src/test/java/log4j/AppTest.java

Added: logging/log4j/companions/zeroconf/trunk/LICENSE
URL: 
http://svn.apache.org/viewvc/logging/log4j/companions/zeroconf/trunk/LICENSE?view=autorev=546008
==
--- logging/log4j/companions/zeroconf/trunk/LICENSE (added)
+++ logging/log4j/companions/zeroconf/trunk/LICENSE Sun Jun 10 22:09:57 2007
@@ -0,0 +1,202 @@
+
+ Apache License
+   Version 2.0, January 2004
+http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+  License shall mean the terms and conditions for use, reproduction,
+  and distribution as defined by Sections 1 through 9 of this document.
+
+  Licensor shall mean the copyright owner or entity authorized by
+  the copyright owner that is granting the License.
+
+  Legal Entity shall mean the union of the acting entity and all
+  other entities that control, are controlled by, or are under common
+  control with that entity. For the purposes of this definition,
+  control means (i) the power, direct or indirect, to cause the
+  direction or management of such entity, whether by contract or
+  otherwise, or (ii) ownership of fifty percent (50%) or more of the
+  outstanding shares, or (iii) beneficial ownership of such entity.
+
+  You (or Your) shall mean an individual or Legal Entity
+  exercising permissions granted by this License.
+
+  Source form shall mean the preferred form for making modifications,
+  including but not limited to software source code, documentation
+  source, and configuration files.
+
+  Object form shall mean any form resulting from mechanical
+  transformation or translation of a Source form, including but
+  not limited to compiled object code, generated documentation,
+  and conversions to other media types.
+
+  Work shall mean the work of authorship, whether in Source or
+  Object form, made available under the License, as indicated by a
+  copyright notice that is included in or attached to the work
+  (an example is provided in the Appendix below).
+
+  Derivative Works shall mean any work, whether in Source or Object
+  form, that is based on (or derived from) the Work and for which the
+  editorial revisions, annotations, elaborations, or other modifications
+  represent, as a whole, an original work of authorship. For the purposes
+  of this License, Derivative Works shall not include works that remain
+  separable from, or merely link (or bind by name) to the interfaces of,
+  the Work and Derivative Works thereof.
+
+  Contribution shall mean any work of authorship, including
+  the original version of the Work and any modifications or additions
+  to that Work or Derivative Works thereof, that is intentionally
+  submitted to Licensor for inclusion in the Work by the copyright owner
+  or by an individual or Legal Entity authorized to submit on behalf of
+  the copyright owner. For the purposes of this definition, submitted
+  means any form of electronic, verbal, or written communication sent
+  to the Licensor or its representatives, including but not limited to
+  communication on electronic mailing lists, source code control systems,
+  and issue tracking systems that are managed by, or on behalf of, the
+  Licensor for the purpose of discussing and improving the Work, but
+  excluding communication that is conspicuously marked or otherwise
+  designated in writing by the copyright owner as Not a Contribution.
+
+  Contributor shall mean Licensor and any individual or Legal Entity
+  on behalf of whom a Contribution has been received by Licensor and
+  subsequently incorporated within

svn commit: r546009 - /logging/log4j/companions/zeroconf/trunk/src/main/java/org/apache/log4j/net/

2007-06-10 Thread psmith
Author: psmith
Date: Sun Jun 10 22:12:56 2007
New Revision: 546009

URL: http://svn.apache.org/viewvc?view=revrev=546009
Log:
Relocating the zeroconf to a seperate companion module.


Added:
logging/log4j/companions/zeroconf/trunk/src/main/java/org/apache/log4j/net/
  - copied from r546008, 
logging/chainsaw/trunk/src/main/java/org/apache/log4j/net/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r546010 - /logging/log4j/companions/zeroconf/trunk/src/test/java/log4j/AppTest.java

2007-06-10 Thread psmith
Author: psmith
Date: Sun Jun 10 22:14:36 2007
New Revision: 546010

URL: http://svn.apache.org/viewvc?view=revrev=546010
Log:
Removed mvn archetype test.


Removed:
logging/log4j/companions/zeroconf/trunk/src/test/java/log4j/AppTest.java


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r546015 - in /logging/log4j/companions/zeroconf/trunk/src/test/java: log4j/ org/ org/apache/ org/apache/log4j/

2007-06-10 Thread psmith
Author: psmith
Date: Sun Jun 10 22:28:05 2007
New Revision: 546015

URL: http://svn.apache.org/viewvc?view=revrev=546015
Log:
updating src folders for test case move.


Added:
logging/log4j/companions/zeroconf/trunk/src/test/java/org/
logging/log4j/companions/zeroconf/trunk/src/test/java/org/apache/
logging/log4j/companions/zeroconf/trunk/src/test/java/org/apache/log4j/
Removed:
logging/log4j/companions/zeroconf/trunk/src/test/java/log4j/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r546016 - /logging/log4j/companions/zeroconf/trunk/src/test/java/org/apache/log4j/net/

2007-06-10 Thread psmith
Author: psmith
Date: Sun Jun 10 22:29:22 2007
New Revision: 546016

URL: http://svn.apache.org/viewvc?view=revrev=546016
Log:

Relocating zeroconf tests to companion module.


Added:
logging/log4j/companions/zeroconf/trunk/src/test/java/org/apache/log4j/net/
  - copied from r546015, 
logging/chainsaw/trunk/src/test/java/org/apache/log4j/net/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r533564 - in /logging/sandbox: jul-to-log4j-bridge/ juli-to-log4j-bridge/

2007-04-29 Thread psmith
Author: psmith
Date: Sun Apr 29 14:57:04 2007
New Revision: 533564

URL: http://svn.apache.org/viewvc?view=revrev=533564
Log:
Final naming move.  Forgot the top level directory!


Added:
logging/sandbox/jul-to-log4j-bridge/
  - copied from r533563, logging/sandbox/juli-to-log4j-bridge/
Removed:
logging/sandbox/juli-to-log4j-bridge/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r533568 - /logging/sandbox/jul-to-log4j-bridge/README.txt

2007-04-29 Thread psmith
Author: psmith
Date: Sun Apr 29 15:11:34 2007
New Revision: 533568

URL: http://svn.apache.org/viewvc?view=revrev=533568
Log:
Slight update to README.

Modified:
logging/sandbox/jul-to-log4j-bridge/README.txt

Modified: logging/sandbox/jul-to-log4j-bridge/README.txt
URL: 
http://svn.apache.org/viewvc/logging/sandbox/jul-to-log4j-bridge/README.txt?view=diffrev=533568r1=533567r2=533568
==
--- logging/sandbox/jul-to-log4j-bridge/README.txt (original)
+++ logging/sandbox/jul-to-log4j-bridge/README.txt Sun Apr 29 15:11:34 2007
@@ -1,22 +1,35 @@
-Requirements: JDK 1.4+, and log4j 1.2.15
+Bridging support between the java.util.logging (JUL) framework and log4j.
 
-Bridging support between the java.util.logging framework and log4j.
+Requirements: JDK 1.4+, and log4j 1.2.15 
 
-Key classes:
+This library will not work with log4j 1.2.14 or earlier.
 
-   * org.apache.logging.julibridge.JuliLog4jBridge - main entry point to 
configure a bridge
+Key classes:
 
+   * org.apache.logging.julbridge.JULLog4jBridge - main entry point to 
configure a bridge
+   * org.apache.logging.julbridge.JULLevelConverter - Because the JUL 
Level classes are quite different
+ this converter interface performs the mapping into the log4j Level 
space.  In
+ many cases you can use a default converter.
+   
+Example 1 - Completely take over JUL and route all LogRecords into log4j 
+
+   
+   JULLog4jBridge.assimilate();
+
+Example 2 - As (1), but using log4j XML configuration 
+
+
+   log4j:configuration xmlns:log4j=http://jakarta.apache.org/log4j/; 
debug=true
+  plugin name=julreceiver class=org.apache.log4j.jul.JULReceiver 
/
+  ..
+   /log4j:configuration
 
-Examples:
+Example 2 - Bridge a single JUL Logger
+===
 
-   JuliLog4jBridge.bridgeJuliLogger(foo);
+   JULLog4jBridge.bridgeJULLogger(foo);
 
This bridges all events posted to the 'foo' logger into log4j's Logger 
called 'foo'.
 
-   NOTE: this does NOT automatically bridge child Loggers.  Currenty one 
must bridge each Logger you require.
+   NOTE: this does NOT automatically bridge child Loggers.  
 
-TODO
-   * LocationInfo is not working at this time
-   * Create an automatic bridge, non-daemon thread that polls the juli 
Logger
- hierarchy and automatically bridges them. 
-   * Tidy up of the Maven pom.xml - it's quite copy/pasted
\ No newline at end of file



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r533461 - in /logging/sandbox/juli-to-log4j-bridge/src: main/java/org/apache/log4j/ main/java/org/apache/log4j/jul/ test/java/org/apache/log4j/ test/java/org/apache/log4j/jul/ test/resourc

2007-04-28 Thread psmith
Author: psmith
Date: Sat Apr 28 20:50:26 2007
New Revision: 533461

URL: http://svn.apache.org/viewvc?view=revrev=533461
Log:
Added JULReceiver that uses the bridge, plus test case.

Test case passes under ant, but not with maven.  Cause unknown as yet.


Added:
logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/log4j/
logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/log4j/jul/

logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/log4j/jul/JULReceiver.java
logging/sandbox/juli-to-log4j-bridge/src/test/java/org/apache/log4j/
logging/sandbox/juli-to-log4j-bridge/src/test/java/org/apache/log4j/jul/

logging/sandbox/juli-to-log4j-bridge/src/test/java/org/apache/log4j/jul/JULReceiverTest.java
logging/sandbox/juli-to-log4j-bridge/src/test/resources/org/
logging/sandbox/juli-to-log4j-bridge/src/test/resources/org/apache/
logging/sandbox/juli-to-log4j-bridge/src/test/resources/org/apache/log4j/

logging/sandbox/juli-to-log4j-bridge/src/test/resources/org/apache/log4j/jul/

logging/sandbox/juli-to-log4j-bridge/src/test/resources/org/apache/log4j/jul/JULReceiverPluginTest.xml

Added: 
logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/log4j/jul/JULReceiver.java
URL: 
http://svn.apache.org/viewvc/logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/log4j/jul/JULReceiver.java?view=autorev=533461
==
--- 
logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/log4j/jul/JULReceiver.java
 (added)
+++ 
logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/log4j/jul/JULReceiver.java
 Sat Apr 28 20:50:26 2007
@@ -0,0 +1,35 @@
+package org.apache.log4j.jul;
+
+import org.apache.log4j.plugins.Plugin;
+import org.apache.log4j.plugins.PluginSkeleton;
+import org.apache.logging.julbridge.JULLevelConverter;
+import org.apache.logging.julbridge.JULLog4jBridge;
+import org.apache.logging.julbridge.JULLog4jEventConverter;
+
+public class JULReceiver extends PluginSkeleton implements Plugin{
+
+private String levelConverterClassName;
+
+public void shutdown() {
+JULLog4jBridge.repatriate();
+
+}
+
+public void activateOptions() {
+JULLevelConverter converter = 
JULLog4jEventConverter.DEFAULT_LEVEL_CONVERTER;
+if (levelConverterClassName!=null) {
+Class clazz = null;
+try {
+clazz = Class.forName(levelConverterClassName);
+converter = (JULLevelConverter) clazz.newInstance();
+} catch (Exception e) {
+getLogger().error(
+Failed to create converter class  + 
levelConverterClassName + ', e);
+return;
+}
+}
+JULLog4jBridge.assimilate(getLoggerRepository(), converter);
+active = true;
+}
+
+}

Added: 
logging/sandbox/juli-to-log4j-bridge/src/test/java/org/apache/log4j/jul/JULReceiverTest.java
URL: 
http://svn.apache.org/viewvc/logging/sandbox/juli-to-log4j-bridge/src/test/java/org/apache/log4j/jul/JULReceiverTest.java?view=autorev=533461
==
--- 
logging/sandbox/juli-to-log4j-bridge/src/test/java/org/apache/log4j/jul/JULReceiverTest.java
 (added)
+++ 
logging/sandbox/juli-to-log4j-bridge/src/test/java/org/apache/log4j/jul/JULReceiverTest.java
 Sat Apr 28 20:50:26 2007
@@ -0,0 +1,48 @@
+package org.apache.log4j.jul;
+
+import java.net.URL;
+
+import org.apache.log4j.LogManager;
+import org.apache.log4j.Logger;
+import org.apache.log4j.LoggerRepositoryExImpl;
+import org.apache.log4j.plugins.PluginConfigurator;
+import org.apache.log4j.spi.LoggerRepository;
+import org.apache.log4j.spi.RepositorySelector;
+import org.apache.logging.julbridge.MockAppender;
+
+import junit.framework.TestCase;
+
+public class JULReceiverTest extends TestCase {
+
+private final Object repositorySelectorGuard = new Object();
+private MockAppender mockAppender = new MockAppender();
+final LoggerRepository repositoryExImpl = new 
LoggerRepositoryExImpl(LogManager
+.getLoggerRepository());
+
+protected void setUp() throws Exception {
+super.setUp();
+LogManager.resetConfiguration();
+LogManager.setRepositorySelector(new RepositorySelector() {
+
+public LoggerRepository getLoggerRepository() {
+return repositoryExImpl;
+}
+}, repositorySelectorGuard);
+}
+
+protected void tearDown() throws Exception {
+super.tearDown();
+}
+
+public void testJULReceiverPluginConfiguration() {
+URL resource = 
this.getClass().getResource(JULReceiverPluginTest.xml);
+ PluginConfigurator.configure(resource);
+
+Logger.getRootLogger().addAppender(mockAppender);
+java.util.logging.Logger juliLogger = 
java.util.logging.Logger.getLogger(foo

svn commit: r533463 - in /logging/sandbox/juli-to-log4j-bridge/src: main/java/org/apache/log4j/jul/JULReceiver.java test/java/org/apache/log4j/jul/JULReceiverTest.java

2007-04-28 Thread psmith
Author: psmith
Date: Sat Apr 28 21:13:52 2007
New Revision: 533463

URL: http://svn.apache.org/viewvc?view=revrev=533463
Log:
Added license headers


Modified:

logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/log4j/jul/JULReceiver.java

logging/sandbox/juli-to-log4j-bridge/src/test/java/org/apache/log4j/jul/JULReceiverTest.java

Modified: 
logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/log4j/jul/JULReceiver.java
URL: 
http://svn.apache.org/viewvc/logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/log4j/jul/JULReceiver.java?view=diffrev=533463r1=533462r2=533463
==
--- 
logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/log4j/jul/JULReceiver.java
 (original)
+++ 
logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/log4j/jul/JULReceiver.java
 Sat Apr 28 21:13:52 2007
@@ -1,3 +1,19 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the License); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*  http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an AS IS BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
 package org.apache.log4j.jul;
 
 import org.apache.log4j.plugins.Plugin;

Modified: 
logging/sandbox/juli-to-log4j-bridge/src/test/java/org/apache/log4j/jul/JULReceiverTest.java
URL: 
http://svn.apache.org/viewvc/logging/sandbox/juli-to-log4j-bridge/src/test/java/org/apache/log4j/jul/JULReceiverTest.java?view=diffrev=533463r1=533462r2=533463
==
--- 
logging/sandbox/juli-to-log4j-bridge/src/test/java/org/apache/log4j/jul/JULReceiverTest.java
 (original)
+++ 
logging/sandbox/juli-to-log4j-bridge/src/test/java/org/apache/log4j/jul/JULReceiverTest.java
 Sat Apr 28 21:13:52 2007
@@ -1,3 +1,19 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the License); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*  http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an AS IS BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
 package org.apache.log4j.jul;
 
 import java.net.URL;



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r532937 - /logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julibridge/

2007-04-26 Thread psmith
Author: psmith
Date: Thu Apr 26 19:53:43 2007
New Revision: 532937

URL: http://svn.apache.org/viewvc?view=revrev=532937
Log: (empty)

Removed:

logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julibridge/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r532938 - /logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/

2007-04-26 Thread psmith
Author: psmith
Date: Thu Apr 26 19:55:25 2007
New Revision: 532938

URL: http://svn.apache.org/viewvc?view=revrev=532938
Log:
Renaming, this surely won't compile in this state.



Added:

logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/JULBridgeFilter.java
  - copied unchanged from r532936, 
logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/JuliBridgeFilter.java

logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/JULBridgeHandler.java
  - copied unchanged from r532936, 
logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/JuliBridgeHandler.java

logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/JULLevelConverter.java
  - copied unchanged from r532936, 
logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/JuliLevelConverter.java

logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/JULLog4jBridge.java
  - copied unchanged from r532936, 
logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/JuliLog4jBridge.java

logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/JULLog4jEventConverter.java
  - copied unchanged from r532936, 
logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/JuliLog4jEventConverter.java
Removed:

logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/JuliBridgeFilter.java

logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/JuliBridgeHandler.java

logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/JuliLevelConverter.java

logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/JuliLog4jBridge.java

logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/JuliLog4jEventConverter.java


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r532939 - in /logging/sandbox/juli-to-log4j-bridge/src/test/java/org/apache/logging: julbridge/ julibridge/

2007-04-26 Thread psmith
Author: psmith
Date: Thu Apr 26 19:56:42 2007
New Revision: 532939

URL: http://svn.apache.org/viewvc?view=revrev=532939
Log:
Moving test classes to new package structure.  Compiling broken in interim.


Added:

logging/sandbox/juli-to-log4j-bridge/src/test/java/org/apache/logging/julbridge/
  - copied from r532477, 
logging/sandbox/juli-to-log4j-bridge/src/test/java/org/apache/logging/julibridge/
Removed:

logging/sandbox/juli-to-log4j-bridge/src/test/java/org/apache/logging/julibridge/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r532941 - in /logging/sandbox/juli-to-log4j-bridge/src: main/java/org/apache/logging/julbridge/ test/java/org/apache/logging/julbridge/

2007-04-26 Thread psmith
Author: psmith
Date: Thu Apr 26 20:05:43 2007
New Revision: 532941

URL: http://svn.apache.org/viewvc?view=revrev=532941
Log:
Renaming complete, all tests passing again.


Added:

logging/sandbox/juli-to-log4j-bridge/src/test/java/org/apache/logging/julbridge/JULLog4jBridgeTest.java
  - copied, changed from r532939, 
logging/sandbox/juli-to-log4j-bridge/src/test/java/org/apache/logging/julbridge/JuliLog4jBridgeTest.java
Removed:

logging/sandbox/juli-to-log4j-bridge/src/test/java/org/apache/logging/julbridge/JuliLog4jBridgeTest.java
Modified:

logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/JULBridgeFilter.java

logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/JULBridgeHandler.java

logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/JULLevelConverter.java

logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/JULLog4jBridge.java

logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/JULLog4jEventConverter.java

logging/sandbox/juli-to-log4j-bridge/src/test/java/org/apache/logging/julbridge/MockAppender.java

logging/sandbox/juli-to-log4j-bridge/src/test/java/org/apache/logging/julbridge/TestLogPosting.java

Modified: 
logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/JULBridgeFilter.java
URL: 
http://svn.apache.org/viewvc/logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/JULBridgeFilter.java?view=diffrev=532941r1=532940r2=532941
==
--- 
logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/JULBridgeFilter.java
 (original)
+++ 
logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/JULBridgeFilter.java
 Thu Apr 26 20:05:43 2007
@@ -8,7 +8,7 @@
  * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied. See the License
  * for the specific language governing permissions and limitations under the 
License.
  */
-package org.apache.logging.julibridge;
+package org.apache.logging.julbridge;
 
 import java.util.logging.Filter;
 import java.util.logging.LogRecord;
@@ -34,14 +34,14 @@
  * 
  * @author psmith
  */
-class JuliBridgeFilter implements Filter {
+class JULBridgeFilter implements Filter {
 
 private final Logger loggerToPostTo;
-private final JuliLog4jEventConverter converter;
+private final JULLog4jEventConverter converter;
 private final Filter existingJuliFilter;
 
-public JuliBridgeFilter(final Filter existingJuliFilter, Logger 
loggerToPostTo,
-JuliLog4jEventConverter converter) {
+public JULBridgeFilter(final Filter existingJuliFilter, Logger 
loggerToPostTo,
+JULLog4jEventConverter converter) {
 this.existingJuliFilter = existingJuliFilter;
 this.loggerToPostTo = loggerToPostTo;
 this.converter = converter;

Modified: 
logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/JULBridgeHandler.java
URL: 
http://svn.apache.org/viewvc/logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/JULBridgeHandler.java?view=diffrev=532941r1=532940r2=532941
==
--- 
logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/JULBridgeHandler.java
 (original)
+++ 
logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/JULBridgeHandler.java
 Thu Apr 26 20:05:43 2007
@@ -8,7 +8,7 @@
  * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied. See the License
  * for the specific language governing permissions and limitations under the 
License.
  */
-package org.apache.logging.julibridge;
+package org.apache.logging.julbridge;
 
 import java.util.logging.Handler;
 import java.util.logging.LogRecord;
@@ -26,12 +26,12 @@
  * @author psmith
  *
  */
-class JuliBridgeHandler extends Handler{
+class JULBridgeHandler extends Handler{
 
 private final LoggerRepository repository;
-private final JuliLog4jEventConverter converter;
+private final JULLog4jEventConverter converter;
 
-public JuliBridgeHandler(LoggerRepository repository, 
JuliLog4jEventConverter converter) {
+public JULBridgeHandler(LoggerRepository repository, 
JULLog4jEventConverter converter) {
 this.repository = repository;
 this.converter = converter;
 }

Modified: 
logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/JULLevelConverter.java
URL: 
http://svn.apache.org/viewvc/logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julbridge/JULLevelConverter.java?view=diffrev=532941r1=532940r2=532941
==
--- 
logging/sandbox/juli-to-log4j-bridge/src

svn commit: r532195 - in /logging/sandbox/juli-to-log4j-bridge: ./ src/main/java/org/apache/logging/julibridge/ src/test/java/org/apache/logging/julibridge/

2007-04-24 Thread psmith
Author: psmith
Date: Tue Apr 24 21:53:24 2007
New Revision: 532195

URL: http://svn.apache.org/viewvc?view=revrev=532195
Log:
Added 'assimilate' function that completely takes over the juli
logging system.  This mechanism uses a juli Handler
implementation, since that is the only way to gain
access to all LogRecords coming into the Hierachy.  
Filter's only gain access to LogRecords specific to a Logger
and don't observer LogRecords from child Loggers.

Changed the 'bridge' methods so that existing Filters set
on specific loggers are delegated to rather than being overwritten.

Modified the pom.xml to add dependency on log4j 1.2.15 
due to the LocationInfo recent changes.

Added:

logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julibridge/JuliBridgeHandler.java
Modified:
logging/sandbox/juli-to-log4j-bridge/   (props changed)
logging/sandbox/juli-to-log4j-bridge/pom.xml

logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julibridge/JuliBridgeFilter.java

logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julibridge/JuliLevelConverter.java

logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julibridge/JuliLog4jBridge.java

logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julibridge/JuliLog4jEventConverter.java

logging/sandbox/juli-to-log4j-bridge/src/test/java/org/apache/logging/julibridge/JuliLog4jBridgeTest.java

logging/sandbox/juli-to-log4j-bridge/src/test/java/org/apache/logging/julibridge/TestLogPosting.java

Propchange: logging/sandbox/juli-to-log4j-bridge/
--
--- svn:ignore (added)
+++ svn:ignore Tue Apr 24 21:53:24 2007
@@ -0,0 +1 @@
+target

Modified: logging/sandbox/juli-to-log4j-bridge/pom.xml
URL: 
http://svn.apache.org/viewvc/logging/sandbox/juli-to-log4j-bridge/pom.xml?view=diffrev=532195r1=532194r2=532195
==
--- logging/sandbox/juli-to-log4j-bridge/pom.xml (original)
+++ logging/sandbox/juli-to-log4j-bridge/pom.xml Tue Apr 24 21:53:24 2007
@@ -8,7 +8,7 @@
 dependency
   groupIdlog4j/groupId
   artifactIdlog4j/artifactId
-  version1.2.14/version
+  version1.2.15/version
 /dependency
 dependency
   groupIdjunit/groupId
@@ -100,7 +100,7 @@
   dependency
 groupIdlog4j/groupId
 artifactIdlog4j/artifactId
-version1.2.14/version
+version1.2.15/version
   /dependency
 /dependencies
   /plugin

Modified: 
logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julibridge/JuliBridgeFilter.java
URL: 
http://svn.apache.org/viewvc/logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julibridge/JuliBridgeFilter.java?view=diffrev=532195r1=532194r2=532195
==
--- 
logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julibridge/JuliBridgeFilter.java
 (original)
+++ 
logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julibridge/JuliBridgeFilter.java
 Tue Apr 24 21:53:24 2007
@@ -1,18 +1,12 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the License); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * 
- *  http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license
+ * agreements. See the NOTICE file distributed with this work for additional 
information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache 
License, Version 2.0 (the
+ * License); you may not use this file except in compliance with the 
License. You may obtain a
+ * copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless 
required by applicable
+ * law or agreed to in writing, software distributed under the License is 
distributed on an AS IS
+ * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied. See the License
+ * for the specific language governing permissions and limitations under the 
License.
  */
 package org.apache.logging.julibridge;
 
@@ -24,30 +18,39 @@
 import org.apache.log4j.spi.LoggingEvent

svn commit: r532196 - /logging/sandbox/juli-to-log4j-bridge/

2007-04-24 Thread psmith
Author: psmith
Date: Tue Apr 24 21:55:11 2007
New Revision: 532196

URL: http://svn.apache.org/viewvc?view=revrev=532196
Log:
Added Eclipse project settings to svn:ignore.

Since this is a Maven project, one can use the Maven Eclipse plugin.

Modified:
logging/sandbox/juli-to-log4j-bridge/   (props changed)

Propchange: logging/sandbox/juli-to-log4j-bridge/
--
--- svn:ignore (original)
+++ svn:ignore Tue Apr 24 21:55:11 2007
@@ -1 +1,4 @@
 target
+.settings
+.classpath
+.project



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r532197 - /logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julibridge/JuliBridgeHandler.java

2007-04-24 Thread psmith
Author: psmith
Date: Tue Apr 24 21:56:08 2007
New Revision: 532197

URL: http://svn.apache.org/viewvc?view=revrev=532197
Log:
Missed the License header.

Modified:

logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julibridge/JuliBridgeHandler.java

Modified: 
logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julibridge/JuliBridgeHandler.java
URL: 
http://svn.apache.org/viewvc/logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julibridge/JuliBridgeHandler.java?view=diffrev=532197r1=532196r2=532197
==
--- 
logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julibridge/JuliBridgeHandler.java
 (original)
+++ 
logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julibridge/JuliBridgeHandler.java
 Tue Apr 24 21:56:08 2007
@@ -1,3 +1,13 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license
+ * agreements. See the NOTICE file distributed with this work for additional 
information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache 
License, Version 2.0 (the
+ * License); you may not use this file except in compliance with the 
License. You may obtain a
+ * copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless 
required by applicable
+ * law or agreed to in writing, software distributed under the License is 
distributed on an AS IS
+ * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied. See the License
+ * for the specific language governing permissions and limitations under the 
License.
+ */
 package org.apache.logging.julibridge;
 
 import java.util.logging.Handler;



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r531629 - /logging/log4j/branches/v1_2-branch/src/java/org/apache/log4j/net/SocketAppender.java

2007-04-23 Thread psmith
Author: psmith
Date: Mon Apr 23 15:06:43 2007
New Revision: 531629

URL: http://svn.apache.org/viewvc?view=revrev=531629
Log:
Bug 29227 - reduce the 'nastiness' of a connection exception by 
downgrading the level to warn, and dropping the stack trace.

This is some what inline with what is already in trunk(1.3),
which has already dropped the exception, but because there were 
other changes to the internal LogLog-Logger infrastructure change
that allowed an ERROR level internal event to be generated,
the 1.2 version needs to be slightly different, since
LogLog does not have an error level.

Modified:

logging/log4j/branches/v1_2-branch/src/java/org/apache/log4j/net/SocketAppender.java

Modified: 
logging/log4j/branches/v1_2-branch/src/java/org/apache/log4j/net/SocketAppender.java
URL: 
http://svn.apache.org/viewvc/logging/log4j/branches/v1_2-branch/src/java/org/apache/log4j/net/SocketAppender.java?view=diffrev=531629r1=531628r2=531629
==
--- 
logging/log4j/branches/v1_2-branch/src/java/org/apache/log4j/net/SocketAppender.java
 (original)
+++ 
logging/log4j/branches/v1_2-branch/src/java/org/apache/log4j/net/SocketAppender.java
 Mon Apr 23 15:06:43 2007
@@ -211,7 +211,7 @@
 msg +=  We will try again later.;
fireConnector(); // fire the connector thread
   } 
-  LogLog.error(msg, e);
+  LogLog.warn(msg);
 }
   }
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r531630 - /logging/log4j/branches/v1_2-branch/src/java/org/apache/log4j/net/SocketAppender.java

2007-04-23 Thread psmith
Author: psmith
Date: Mon Apr 23 15:08:00 2007
New Revision: 531630

URL: http://svn.apache.org/viewvc?view=revrev=531630
Log:
Bug #29227 Seriously, I needed more coffee, clearly there IS an error level
generation method for LogLog.

This is now much closer to what is in trunk.

Modified:

logging/log4j/branches/v1_2-branch/src/java/org/apache/log4j/net/SocketAppender.java

Modified: 
logging/log4j/branches/v1_2-branch/src/java/org/apache/log4j/net/SocketAppender.java
URL: 
http://svn.apache.org/viewvc/logging/log4j/branches/v1_2-branch/src/java/org/apache/log4j/net/SocketAppender.java?view=diffrev=531630r1=531629r2=531630
==
--- 
logging/log4j/branches/v1_2-branch/src/java/org/apache/log4j/net/SocketAppender.java
 (original)
+++ 
logging/log4j/branches/v1_2-branch/src/java/org/apache/log4j/net/SocketAppender.java
 Mon Apr 23 15:08:00 2007
@@ -211,7 +211,7 @@
 msg +=  We will try again later.;
fireConnector(); // fire the connector thread
   } 
-  LogLog.warn(msg);
+  LogLog.error(msg);
 }
   }
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r531643 - in /logging/log4j/branches/v1_2-branch/src/java/org/apache/log4j/jmx: AppenderDynamicMBean.java HierarchyDynamicMBean.java LoggerDynamicMBean.java

2007-04-23 Thread psmith
Author: psmith
Date: Mon Apr 23 16:08:53 2007
New Revision: 531643

URL: http://svn.apache.org/viewvc?view=revrev=531643
Log:
Bug 42017 Added if check for existence of an MBean name already.

Patch (sort of) supplied by Francesco Dalan.


Modified:

logging/log4j/branches/v1_2-branch/src/java/org/apache/log4j/jmx/AppenderDynamicMBean.java

logging/log4j/branches/v1_2-branch/src/java/org/apache/log4j/jmx/HierarchyDynamicMBean.java

logging/log4j/branches/v1_2-branch/src/java/org/apache/log4j/jmx/LoggerDynamicMBean.java

Modified: 
logging/log4j/branches/v1_2-branch/src/java/org/apache/log4j/jmx/AppenderDynamicMBean.java
URL: 
http://svn.apache.org/viewvc/logging/log4j/branches/v1_2-branch/src/java/org/apache/log4j/jmx/AppenderDynamicMBean.java?view=diffrev=531643r1=531642r2=531643
==
--- 
logging/log4j/branches/v1_2-branch/src/java/org/apache/log4j/jmx/AppenderDynamicMBean.java
 (original)
+++ 
logging/log4j/branches/v1_2-branch/src/java/org/apache/log4j/jmx/AppenderDynamicMBean.java
 Mon Apr 23 16:08:53 2007
@@ -193,14 +193,11 @@
 try {
   LayoutDynamicMBean appenderMBean = new LayoutDynamicMBean(layout);
   objectName = new ObjectName(log4j:appender=+name);
-  server.registerMBean(appenderMBean, objectName);
-
-  dAttributes.add(new MBeanAttributeInfo(appender=+name,
-javax.management.ObjectName,
-The +name+ layout.,
-true,
-true,
-false));
+  if (!server.isRegistered(objectName)) {
+server.registerMBean(appenderMBean, objectName);
+dAttributes.add(new MBeanAttributeInfo(appender= + name, 
javax.management.ObjectName,
+The  + name +  layout., true, true, false));
+  }
 
 } catch(Exception e) {
   cat.error(Could not add DynamicLayoutMBean for [+name+]., e);

Modified: 
logging/log4j/branches/v1_2-branch/src/java/org/apache/log4j/jmx/HierarchyDynamicMBean.java
URL: 
http://svn.apache.org/viewvc/logging/log4j/branches/v1_2-branch/src/java/org/apache/log4j/jmx/HierarchyDynamicMBean.java?view=diffrev=531643r1=531642r2=531643
==
--- 
logging/log4j/branches/v1_2-branch/src/java/org/apache/log4j/jmx/HierarchyDynamicMBean.java
 (original)
+++ 
logging/log4j/branches/v1_2-branch/src/java/org/apache/log4j/jmx/HierarchyDynamicMBean.java
 Mon Apr 23 16:08:53 2007
@@ -118,23 +118,19 @@
 try {
   LoggerDynamicMBean loggerMBean = new LoggerDynamicMBean(logger);
   objectName = new ObjectName(log4j, logger, name);
-  server.registerMBean(loggerMBean, objectName);
-
-  NotificationFilterSupport nfs = new NotificationFilterSupport();
-  nfs.enableType(ADD_APPENDER+logger.getName());
-
-  log.debug(---Adding logger [+name+] as listener.);
-
-  nbs.addNotificationListener(loggerMBean, nfs, null);
-
-
-  vAttributes.add(new MBeanAttributeInfo(logger=+name,
-javax.management.ObjectName,
-The +name+ logger.,
-true,
-true, // this makes the object
-// clickable
-false));
+  
+  if (!server.isRegistered(objectName)) {
+server.registerMBean(loggerMBean, objectName);
+NotificationFilterSupport nfs = new NotificationFilterSupport();
+nfs.enableType(ADD_APPENDER + logger.getName());
+log.debug(---Adding logger [ + name + ] as listener.);
+nbs.addNotificationListener(loggerMBean, nfs, null);
+vAttributes.add(new MBeanAttributeInfo(logger= + name, 
javax.management.ObjectName,
+The  + name +  logger., true, true, // this makes the 
object
+// clickable
+false));
+
+  }
 
 } catch(Exception e) {
   log.error(Could not add loggerMBean for [+name+]., e);

Modified: 
logging/log4j/branches/v1_2-branch/src/java/org/apache/log4j/jmx/LoggerDynamicMBean.java
URL: 
http://svn.apache.org/viewvc/logging/log4j/branches/v1_2-branch/src/java/org/apache/log4j/jmx/LoggerDynamicMBean.java?view=diffrev=531643r1=531642r2=531643
==
--- 
logging/log4j/branches/v1_2-branch/src/java/org/apache/log4j/jmx/LoggerDynamicMBean.java
 (original)
+++ 
logging/log4j/branches/v1_2-branch/src/java/org/apache/log4j/jmx/LoggerDynamicMBean.java
 Mon Apr 23 16:08:53 2007
@@ -258,14 +258,11 @@
 try {
   AppenderDynamicMBean appenderMBean = new AppenderDynamicMBean(appender);
   objectName = new ObjectName(log4j, appender, name

svn commit: r531720 - in /logging/sandbox/juli-to-log4j-bridge: ./ src/ src/main/ src/main/config/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/logging/ src/mai

2007-04-23 Thread psmith
Author: psmith
Date: Mon Apr 23 21:54:01 2007
New Revision: 531720

URL: http://svn.apache.org/viewvc?view=revrev=531720
Log:
Initial import of a java.util.logging (Juli?) bridge
that allows a user to filter LogRecords straight
into a correspondingly named log4j Logger.

This project obviously requires JDK 1.4+.

I'm currently not handling LocationInfo stuff, will have to get
to that next.

The Maven pom.xml is probably b0rk3n since I pretty much copied
and pasted it from another log4j project and tried to tidy it up,
but it does seem to work ok..

Added:
logging/sandbox/juli-to-log4j-bridge/LICENSE
logging/sandbox/juli-to-log4j-bridge/NOTICE
logging/sandbox/juli-to-log4j-bridge/README.txt
logging/sandbox/juli-to-log4j-bridge/pom.xml
logging/sandbox/juli-to-log4j-bridge/src/
logging/sandbox/juli-to-log4j-bridge/src/main/
logging/sandbox/juli-to-log4j-bridge/src/main/config/
logging/sandbox/juli-to-log4j-bridge/src/main/java/
logging/sandbox/juli-to-log4j-bridge/src/main/java/org/
logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/
logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/

logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julibridge/

logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julibridge/JuliBridgeFilter.java

logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julibridge/JuliLevelConverter.java

logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julibridge/JuliLog4jBridge.java

logging/sandbox/juli-to-log4j-bridge/src/main/java/org/apache/logging/julibridge/JuliLog4jEventConverter.java
logging/sandbox/juli-to-log4j-bridge/src/main/resources/
logging/sandbox/juli-to-log4j-bridge/src/test/
logging/sandbox/juli-to-log4j-bridge/src/test/java/
logging/sandbox/juli-to-log4j-bridge/src/test/java/org/
logging/sandbox/juli-to-log4j-bridge/src/test/java/org/apache/
logging/sandbox/juli-to-log4j-bridge/src/test/java/org/apache/logging/

logging/sandbox/juli-to-log4j-bridge/src/test/java/org/apache/logging/julibridge/

logging/sandbox/juli-to-log4j-bridge/src/test/java/org/apache/logging/julibridge/JuliLog4jBridgeTest.java

logging/sandbox/juli-to-log4j-bridge/src/test/java/org/apache/logging/julibridge/MockAppender.java

logging/sandbox/juli-to-log4j-bridge/src/test/java/org/apache/logging/julibridge/TestLogPosting.java
logging/sandbox/juli-to-log4j-bridge/src/test/resources/

Added: logging/sandbox/juli-to-log4j-bridge/LICENSE
URL: 
http://svn.apache.org/viewvc/logging/sandbox/juli-to-log4j-bridge/LICENSE?view=autorev=531720
==
--- logging/sandbox/juli-to-log4j-bridge/LICENSE (added)
+++ logging/sandbox/juli-to-log4j-bridge/LICENSE Mon Apr 23 21:54:01 2007
@@ -0,0 +1,202 @@
+
+ Apache License
+   Version 2.0, January 2004
+http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+  License shall mean the terms and conditions for use, reproduction,
+  and distribution as defined by Sections 1 through 9 of this document.
+
+  Licensor shall mean the copyright owner or entity authorized by
+  the copyright owner that is granting the License.
+
+  Legal Entity shall mean the union of the acting entity and all
+  other entities that control, are controlled by, or are under common
+  control with that entity. For the purposes of this definition,
+  control means (i) the power, direct or indirect, to cause the
+  direction or management of such entity, whether by contract or
+  otherwise, or (ii) ownership of fifty percent (50%) or more of the
+  outstanding shares, or (iii) beneficial ownership of such entity.
+
+  You (or Your) shall mean an individual or Legal Entity
+  exercising permissions granted by this License.
+
+  Source form shall mean the preferred form for making modifications,
+  including but not limited to software source code, documentation
+  source, and configuration files.
+
+  Object form shall mean any form resulting from mechanical
+  transformation or translation of a Source form, including but
+  not limited to compiled object code, generated documentation,
+  and conversions to other media types.
+
+  Work shall mean the work of authorship, whether in Source or
+  Object form, made available under the License, as indicated by a
+  copyright notice that is included in or attached to the work
+  (an example is provided in the Appendix below).
+
+  Derivative Works shall mean any work, whether in Source or Object
+  form, that is based on (or derived from) the Work and for which the
+  editorial revisions, annotations, elaborations, or other

svn commit: r531723 - /logging/sandbox/juli-to-log4j-bridge/NOTICE

2007-04-23 Thread psmith
Author: psmith
Date: Mon Apr 23 22:03:25 2007
New Revision: 531723

URL: http://svn.apache.org/viewvc?view=revrev=531723
Log:
erm, copy paste fix up.


Modified:
logging/sandbox/juli-to-log4j-bridge/NOTICE

Modified: logging/sandbox/juli-to-log4j-bridge/NOTICE
URL: 
http://svn.apache.org/viewvc/logging/sandbox/juli-to-log4j-bridge/NOTICE?view=diffrev=531723r1=531722r2=531723
==
--- logging/sandbox/juli-to-log4j-bridge/NOTICE (original)
+++ logging/sandbox/juli-to-log4j-bridge/NOTICE Mon Apr 23 22:03:25 2007
@@ -1,5 +1,6 @@
-Apache log4j 1.3 component model
+Apache java.util.logging - log4j bridge component
+
 Copyright 2007 The Apache Software Foundation
 
 This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
\ No newline at end of file
+The Apache Software Foundation (http://www.apache.org/).



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r530973 - /logging/log4j/branches/v1_2-branch/src/java/org/apache/log4j/spi/LoggingEvent.java

2007-04-20 Thread psmith
Author: psmith
Date: Fri Apr 20 20:05:51 2007
New Revision: 530973

URL: http://svn.apache.org/viewvc?view=revrev=530973
Log:
Port portion of revision 310506 of LoggingEvent from trunk(1.3) so that when 
fqnOfCategoryClass is 
null, no LocationInfo object is automatically created.

Reviewed by: Curt Arnold

Modified:

logging/log4j/branches/v1_2-branch/src/java/org/apache/log4j/spi/LoggingEvent.java

Modified: 
logging/log4j/branches/v1_2-branch/src/java/org/apache/log4j/spi/LoggingEvent.java
URL: 
http://svn.apache.org/viewvc/logging/log4j/branches/v1_2-branch/src/java/org/apache/log4j/spi/LoggingEvent.java?view=diffrev=530973r1=530972r2=530973
==
--- 
logging/log4j/branches/v1_2-branch/src/java/org/apache/log4j/spi/LoggingEvent.java
 (original)
+++ 
logging/log4j/branches/v1_2-branch/src/java/org/apache/log4j/spi/LoggingEvent.java
 Fri Apr 20 20:05:51 2007
@@ -242,7 +242,7 @@
  information is cached for future use.
*/
   public LocationInfo getLocationInformation() {
-if(locationInfo == null) {
+if(locationInfo == null  fqnOfCategoryClass != null) {
   locationInfo = new LocationInfo(new Throwable(), fqnOfCategoryClass);
 }
 return locationInfo;



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r530249 - in /logging/sandbox/log4j/receivers: ./ src/main/java/org/apache/log4j/db/ src/main/java/org/apache/log4j/net/

2007-04-18 Thread psmith
Author: psmith
Date: Wed Apr 18 20:25:33 2007
New Revision: 530249

URL: http://svn.apache.org/viewvc?view=revrev=530249
Log:
Final tidy up of addition of other receivers from log4j 1.3.

Reviewed by: Curt and Scott


Added:
logging/sandbox/log4j/receivers/src/main/java/org/apache/log4j/db/
  - copied from r529843, logging/log4j/trunk/src/java/org/apache/log4j/db/

logging/sandbox/log4j/receivers/src/main/java/org/apache/log4j/net/JMSReceiver.java
  - copied unchanged from r529796, 
logging/log4j/trunk/src/java/org/apache/log4j/net/JMSReceiver.java

logging/sandbox/log4j/receivers/src/main/java/org/apache/log4j/net/JMSReceiverBeanInfo.java
  - copied unchanged from r529796, 
logging/log4j/trunk/src/java/org/apache/log4j/net/JMSReceiverBeanInfo.java

logging/sandbox/log4j/receivers/src/main/java/org/apache/log4j/net/MulticastReceiver.java
  - copied unchanged from r529796, 
logging/log4j/trunk/src/java/org/apache/log4j/net/MulticastReceiver.java

logging/sandbox/log4j/receivers/src/main/java/org/apache/log4j/net/MulticastReceiverBeanInfo.java
  - copied unchanged from r529796, 
logging/log4j/trunk/src/java/org/apache/log4j/net/MulticastReceiverBeanInfo.java

logging/sandbox/log4j/receivers/src/main/java/org/apache/log4j/net/UDPReceiver.java
  - copied unchanged from r529796, 
logging/log4j/trunk/src/java/org/apache/log4j/net/UDPReceiver.java

logging/sandbox/log4j/receivers/src/main/java/org/apache/log4j/net/XMLSocketNode.java
  - copied unchanged from r529796, 
logging/log4j/trunk/src/java/org/apache/log4j/net/XMLSocketNode.java

logging/sandbox/log4j/receivers/src/main/java/org/apache/log4j/net/XMLSocketReceiver.java
  - copied unchanged from r529796, 
logging/log4j/trunk/src/java/org/apache/log4j/net/XMLSocketReceiver.java
Modified:
logging/sandbox/log4j/receivers/pom.xml

logging/sandbox/log4j/receivers/src/main/java/org/apache/log4j/db/CustomSQLDBReceiver.java

logging/sandbox/log4j/receivers/src/main/java/org/apache/log4j/db/DBAppender.java

logging/sandbox/log4j/receivers/src/main/java/org/apache/log4j/db/DBReceiverJob.java

Modified: logging/sandbox/log4j/receivers/pom.xml
URL: 
http://svn.apache.org/viewvc/logging/sandbox/log4j/receivers/pom.xml?view=diffrev=530249r1=530248r2=530249
==
--- logging/sandbox/log4j/receivers/pom.xml (original)
+++ logging/sandbox/log4j/receivers/pom.xml Wed Apr 18 20:25:33 2007
@@ -116,7 +116,12 @@
   groupIdoro/groupId
   artifactIdoro/artifactId
   version2.0.8/version
-/dependency
+/dependency  
+dependency
+  groupIdjavax.jms/groupId
+  artifactIdjms/artifactId
+  version1.1/version
+/dependency  
   /dependencies
   reporting
 plugins

Modified: 
logging/sandbox/log4j/receivers/src/main/java/org/apache/log4j/db/CustomSQLDBReceiver.java
URL: 
http://svn.apache.org/viewvc/logging/sandbox/log4j/receivers/src/main/java/org/apache/log4j/db/CustomSQLDBReceiver.java?view=diffrev=530249r1=529843r2=530249
==
--- 
logging/sandbox/log4j/receivers/src/main/java/org/apache/log4j/db/CustomSQLDBReceiver.java
 (original)
+++ 
logging/sandbox/log4j/receivers/src/main/java/org/apache/log4j/db/CustomSQLDBReceiver.java
 Wed Apr 18 20:25:33 2007
@@ -398,19 +398,24 @@
 }
 
 Level levelImpl = Level.toLevel(level);
-LoggingEvent event = new LoggingEvent(
-eventLogger.getName(), eventLogger, levelImpl,
-message, null);
-event.setLocationInformation(new LocationInfo(fileName,
-className, methodName, lineNumber));
-properties.putAll(mdc);
-event.setTimeStamp(timeStamp);
-event.setThrowableInformation(new ThrowableInformation(
-exception));
 
-event.setProperties(properties);
-event.setThreadName(threadName);
-event.setNDC(ndc);
+
+   LocationInfo locationInfo = new 
LocationInfo(fileName,
+   className, methodName, lineNumber);
+   
+   ThrowableInformation throwableInfo =  
new ThrowableInformation(
+   exception);
+   
+   properties.putAll(mdc);
+   
+   LoggingEvent event = new 
LoggingEvent(eventLogger.getName(),
+   eventLogger, timeStamp, levelImpl, 
message,
+   threadName,
+   throwableInfo,
+   ndc

svn commit: r529788 - /logging/sandbox/log4j/receivers/src/main/java/org/apache/log4j/varia/LogFilePatternReceiver.java

2007-04-17 Thread psmith
Author: psmith
Date: Tue Apr 17 15:09:54 2007
New Revision: 529788

URL: http://svn.apache.org/viewvc?view=revrev=529788
Log:
Coping log4j trunk (1.3) version of LogFilePatternReceiver.java over to sandbox 
receiver area in readiness
for combining with Chainsaw.


Added:

logging/sandbox/log4j/receivers/src/main/java/org/apache/log4j/varia/LogFilePatternReceiver.java
  - copied unchanged from r529787, 
logging/log4j/trunk/src/java/org/apache/log4j/varia/LogFilePatternReceiver.java


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r529789 - /logging/sandbox/log4j/receivers/src/main/java/org/apache/log4j/varia/LogFilePatternReceiverBeanInfo.java

2007-04-17 Thread psmith
Author: psmith
Date: Tue Apr 17 15:10:49 2007
New Revision: 529789

URL: http://svn.apache.org/viewvc?view=revrev=529789
Log:
Coping log4j trunk (1.3) version of LogFilePatternReceiverBeanInfo.java over to 
sandbox receiver area in readiness
for combining with Chainsaw.


Added:

logging/sandbox/log4j/receivers/src/main/java/org/apache/log4j/varia/LogFilePatternReceiverBeanInfo.java
  - copied unchanged from r529788, 
logging/log4j/trunk/src/java/org/apache/log4j/varia/LogFilePatternReceiverBeanInfo.java


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r529792 - in /logging/sandbox/log4j/receivers: pom.xml src/main/java/org/apache/log4j/varia/LogFilePatternReceiver.java

2007-04-17 Thread psmith
Author: psmith
Date: Tue Apr 17 15:19:31 2007
New Revision: 529792

URL: http://svn.apache.org/viewvc?view=revrev=529792
Log:
* Fixed up LoggingEvent constructor usage to comply with log4j 1.2.
* Changed pom.xml to reference expression-filter project due to the 
LogFilePatternRecevier dependency on Rule schtuff


Modified:
logging/sandbox/log4j/receivers/pom.xml

logging/sandbox/log4j/receivers/src/main/java/org/apache/log4j/varia/LogFilePatternReceiver.java

Modified: logging/sandbox/log4j/receivers/pom.xml
URL: 
http://svn.apache.org/viewvc/logging/sandbox/log4j/receivers/pom.xml?view=diffrev=529792r1=529791r2=529792
==
--- logging/sandbox/log4j/receivers/pom.xml (original)
+++ logging/sandbox/log4j/receivers/pom.xml Tue Apr 17 15:19:31 2007
@@ -108,6 +108,11 @@
   version0.1-SNAPSHOT/version
 /dependency
 dependency
+  groupIdlog4j/groupId
+  artifactIdapache-log4j-expression-filter/artifactId
+  version0.1-SNAPSHOT/version
+/dependency
+dependency
   groupIdoro/groupId
   artifactIdoro/artifactId
   version2.0.8/version

Modified: 
logging/sandbox/log4j/receivers/src/main/java/org/apache/log4j/varia/LogFilePatternReceiver.java
URL: 
http://svn.apache.org/viewvc/logging/sandbox/log4j/receivers/src/main/java/org/apache/log4j/varia/LogFilePatternReceiver.java?view=diffrev=529792r1=529791r2=529792
==
--- 
logging/sandbox/log4j/receivers/src/main/java/org/apache/log4j/varia/LogFilePatternReceiver.java
 (original)
+++ 
logging/sandbox/log4j/receivers/src/main/java/org/apache/log4j/varia/LogFilePatternReceiver.java
 Tue Apr 17 15:19:31 2007
@@ -755,16 +755,14 @@
   info = LocationInfo.NA_LOCATION_INFO;
 }
 
-LoggingEvent event = new LoggingEvent();
-event.setLogger(logger);
-event.setTimeStamp(timeStamp);
-event.setLevel(levelImpl);
-event.setThreadName(threadName);
-event.setMessage(message);
-event.setThrowableInformation(new ThrowableInformation(exception));
-event.setLocationInformation(info);
-event.setNDC(ndc);
-event.setProperties(properties);
+LoggingEvent event = new LoggingEvent(null,
+logger, timeStamp, levelImpl, message,
+threadName,
+new ThrowableInformation(exception),
+ndc,
+info,
+properties);
+
 return event;
   }
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r523860 - /logging/sandbox/LoggingDomains/LICENSE.txt

2007-03-29 Thread psmith
Author: psmith
Date: Thu Mar 29 15:37:59 2007
New Revision: 523860

URL: http://svn.apache.org/viewvc?view=revrev=523860
Log:
Copied LICENSE.txt from another sandbox project


Added:
logging/sandbox/LoggingDomains/LICENSE.txt
  - copied unchanged from r523859, logging/sandbox/strictxml/LICENSE.txt


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r523866 - in /logging/sandbox/LoggingDomains: generic-src/org/apache/logging/ generic-src/org/apache/logging/domains/ generic-src/org/apache/loggingdomains/ generic-test/org/apache/logging

2007-03-29 Thread psmith
Author: psmith
Date: Thu Mar 29 15:55:27 2007
New Revision: 523866

URL: http://svn.apache.org/viewvc?view=revrev=523866
Log:
Renamed packages:

* org.apache.loggingdomains - org.apache.logging.domains
* org.apache.log4j.loggingdomains - org.apache.log4j.domains


Added:
logging/sandbox/LoggingDomains/generic-src/org/apache/logging/
logging/sandbox/LoggingDomains/generic-src/org/apache/logging/domains/
  - copied from r523860, 
logging/sandbox/LoggingDomains/generic-src/org/apache/loggingdomains/

logging/sandbox/LoggingDomains/generic-src/org/apache/logging/domains/LoggingDomain.java
  - copied, changed from r523865, 
logging/sandbox/LoggingDomains/generic-src/org/apache/loggingdomains/LoggingDomain.java

logging/sandbox/LoggingDomains/generic-src/org/apache/logging/domains/LoggingDomainListener.java
  - copied, changed from r523865, 
logging/sandbox/LoggingDomains/generic-src/org/apache/loggingdomains/LoggingDomainListener.java

logging/sandbox/LoggingDomains/generic-src/org/apache/logging/domains/LoggingDomainRegistry.java
  - copied, changed from r523865, 
logging/sandbox/LoggingDomains/generic-src/org/apache/loggingdomains/LoggingDomainRegistry.java

logging/sandbox/LoggingDomains/generic-src/org/apache/logging/domains/LoggingDomainUtils.java
  - copied, changed from r523865, 
logging/sandbox/LoggingDomains/generic-src/org/apache/loggingdomains/LoggingDomainUtils.java

logging/sandbox/LoggingDomains/generic-src/org/apache/logging/domains/LoggingDomains.java
  - copied, changed from r523865, 
logging/sandbox/LoggingDomains/generic-src/org/apache/loggingdomains/LoggingDomains.java
logging/sandbox/LoggingDomains/generic-test/org/apache/logging/
logging/sandbox/LoggingDomains/generic-test/org/apache/logging/domains/
  - copied from r523860, 
logging/sandbox/LoggingDomains/generic-test/org/apache/loggingdomains/

logging/sandbox/LoggingDomains/generic-test/org/apache/logging/domains/LoggingDomainUtilsTest.java
  - copied, changed from r523865, 
logging/sandbox/LoggingDomains/generic-test/org/apache/loggingdomains/LoggingDomainUtilsTest.java
logging/sandbox/LoggingDomains/log4j-src/org/apache/log4j/domains/

logging/sandbox/LoggingDomains/log4j-src/org/apache/log4j/domains/Log4jLoggerRepositoryPoller.java
  - copied, changed from r523861, 
logging/sandbox/LoggingDomains/log4j-src/org/apache/log4j/loggingdomains/Log4jLoggerRepositoryPoller.java

logging/sandbox/LoggingDomains/log4j-src/org/apache/log4j/domains/Log4jLoggingDomainConstants.java
  - copied, changed from r523861, 
logging/sandbox/LoggingDomains/log4j-src/org/apache/log4j/loggingdomains/Log4jLoggingDomainConstants.java

logging/sandbox/LoggingDomains/log4j-src/org/apache/log4j/domains/Log4jLoggingDomainExtractor.java
  - copied, changed from r523861, 
logging/sandbox/LoggingDomains/log4j-src/org/apache/log4j/loggingdomains/Log4jLoggingDomainExtractor.java

logging/sandbox/LoggingDomains/log4j-src/org/apache/log4j/domains/Log4jLoggingDomainRegistry.java
  - copied, changed from r523861, 
logging/sandbox/LoggingDomains/log4j-src/org/apache/log4j/loggingdomains/Log4jLoggingDomainRegistry.java
logging/sandbox/LoggingDomains/log4j-src/org/apache/log4j/domains/jmx/
  - copied from r523860, 
logging/sandbox/LoggingDomains/log4j-src/org/apache/log4j/loggingdomains/jmx/

logging/sandbox/LoggingDomains/log4j-src/org/apache/log4j/domains/jmx/AutomaticLog4jLoggingDomainJMXRegistator.java
  - copied, changed from r523865, 
logging/sandbox/LoggingDomains/log4j-src/org/apache/log4j/loggingdomains/jmx/AutomaticLog4jLoggingDomainJMXRegistator.java

logging/sandbox/LoggingDomains/log4j-src/org/apache/log4j/domains/jmx/Log4jLoggingDomainJMXManager.java
  - copied, changed from r523865, 
logging/sandbox/LoggingDomains/log4j-src/org/apache/log4j/loggingdomains/jmx/Log4jLoggingDomainJMXManager.java

logging/sandbox/LoggingDomains/log4j-src/org/apache/log4j/domains/jmx/Log4jLoggingDomainJMXManagerMBean.java
  - copied, changed from r523865, 
logging/sandbox/LoggingDomains/log4j-src/org/apache/log4j/loggingdomains/jmx/Log4jLoggingDomainJMXManagerMBean.java
logging/sandbox/LoggingDomains/log4j-test/org/apache/log4j/domains/

logging/sandbox/LoggingDomains/log4j-test/org/apache/log4j/domains/Log4jLoggerDomainExtractorTest.java
  - copied, changed from r523861, 
logging/sandbox/LoggingDomains/log4j-test/org/apache/log4j/loggingdomains/Log4jLoggerDomainExtractorTest.java

logging/sandbox/LoggingDomains/log4j-test/org/apache/log4j/domains/Log4jLoggerRepositoryPollerTest.java
  - copied, changed from r523861, 
logging/sandbox/LoggingDomains/log4j-test/org/apache/log4j/loggingdomains/Log4jLoggerRepositoryPollerTest.java
logging/sandbox/LoggingDomains/log4j-test/org/apache/log4j/domains/jmx/

logging/sandbox/LoggingDomains/log4j-test/org/apache/log4j/domains/jmx/Log4jLoggingDomainJMXManagerTestHarness.java

svn commit: r496155 - /logging/chainsaw/trunk/build.xml

2007-01-14 Thread psmith
Author: psmith
Date: Sun Jan 14 13:18:59 2007
New Revision: 496155

URL: http://svn.apache.org/viewvc?view=revrev=496155
Log:
Bug 41239 Mac OSX distribution did not exit
cleanly because of missing jars in the distribution.

Fixed by using the webstart-dist directory of jars, which matches the other 
distribution and 
also uses signed jars to boot

Modified:
logging/chainsaw/trunk/build.xml

Modified: logging/chainsaw/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/logging/chainsaw/trunk/build.xml?view=diffrev=496155r1=496154r2=496155
==
--- logging/chainsaw/trunk/build.xml (original)
+++ logging/chainsaw/trunk/build.xml Sun Jan 14 13:18:59 2007
@@ -375,7 +375,8 @@
copy file=${webstart-dependant-receivers.jar} 
todir=iSaw-dist/
copy file=${log4j-chainsaw.jar} todir=iSaw-dist/
copy todir=iSaw-dist
-   fileset dir=lib
+   fileset dir=webstart-dist
+   include name=*.jar /
exclude name=commons*.jar/
exclude name=*vfs*.jar/
/fileset



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r382247 - in /logging/log4j/trunk: docs/chainsaw.html src/xdocs/chainsaw.xml

2006-03-01 Thread psmith
Author: psmith
Date: Wed Mar  1 18:45:06 2006
New Revision: 382247

URL: http://svn.apache.org/viewcvs?rev=382247view=rev
Log:
Preparing for the next release of Chainsaw, updated the docs regarding 
notes about VFS/DB/JMS receivers under webstart.

Modified:
logging/log4j/trunk/docs/chainsaw.html
logging/log4j/trunk/src/xdocs/chainsaw.xml

Modified: logging/log4j/trunk/docs/chainsaw.html
URL: 
http://svn.apache.org/viewcvs/logging/log4j/trunk/docs/chainsaw.html?rev=382247r1=382246r2=382247view=diff
==
--- logging/log4j/trunk/docs/chainsaw.html (original)
+++ logging/log4j/trunk/docs/chainsaw.html Wed Mar  1 18:45:06 2006
@@ -64,7 +64,7 @@
lia 
href=http://logging.apache.org/log4j/docs/webstart/chainsaw/chainsaw.dmg;OS X 
'native' distribution/a font size=-1(uses Java still, but looks like a 
real OSX application)/font/li
lia 
href=http://logging.apache.org/log4j/docs/webstart/chainsaw/chainsaw-bundle.zip;Unix/Dos
 standalone/a font size=-1(.bat/.sh)/font/li
 p /  ul
-   lifont size=-1a 
href=#VFSNotesbImportant Distribution notes!!/Using VFS with 
Chainsaw/b/a/font/li
+   lifont size=-1a 
href=#VFSNotesbImportant Distribution notes!!/Using DB/JMS or VFS with 
Chainsaw/b/a/font/li
/ul
/ul
  /p
@@ -108,22 +108,27 @@
 pa name=ExtraDocs /aChainsaw 
already includes help with
   with a Quick Reference and a Tutorial to get you started, all viewable 
from bwithin the GUI/b!. A User Manual will be made available around 
release time. /p

h1Distribution Notes/strong/h1
-pa name=VFSNotes /Due to Java 
classloading rules, it is impossible to ship the a 
href=http://jakarta.apache.org/commons/vfs;Jakarta Commons VFS/a extension 
to Chainsaw.
-   Several VFS filestore implementation jars cannot be shipped 
with Chainsaw because of licensing issues.  The log4j dev team has chosen to 
not distribute VFS
-   with the Web Start version, however you can follow these steps 
to enable the VFS components inside Chainsaw.
+pa name=VFSNotes /Due to Java 
classloading rules, it is impossible to ship the a 
href=http://jakarta.apache.org/commons/vfs;Jakarta Commons VFS/a extension 
to Chainsaw
+   bOR/b have DBReceiver or JMSReceiver bundled with Chainsaw.
+   Several VFS filestore implementation jars cannot be shipped 
with Chainsaw because of licensing issues, and for JMSReceiver and DBReceiver 
you are required
+   to have proprietary driver jars locally which we obviously 
can't ship. You can follow these steps to enable the DB, JMS and/or VFS 
components inside Chainsaw.
ol
-   liDownload the a 
href=http://logging.apache.org/log4j/docs/webstart/chainsaw/log4j-chainsaw-vfs.jar;VFS
 extension/a to Chainsaw/li
-   liDownload a 
href=http://cvs.apache.org/builds/jakarta-commons/nightly/commons-vfs/;VFS/a/li
-   liDownload a 
href=http://jakarta.apache.org/site/downloads/downloads_commons-logging.cgi;Commons
 Logging/a Jars/li
-   liDownload the VFS a 
href=http://jakarta.apache.org/commons/vfs/download.html;filestore 
implementation jars/a you wish to use/li
+   li[DBReceiver] Download the a 
href=http://logging.apache.org/log4j/docs/webstart/chainsaw/log4j-db-1.3alpha-7.jar;DB
 extension/a to Chainsaw/li
+   li[JMSReceiver] Download the a 
href=http://logging.apache.org/log4j/docs/webstart/chainsaw/log4j-jms-1.3alpha-7.jar;JMS
 extension/a to Chainsaw/li
+
+   li[VFS] Download the a 
href=http://logging.apache.org/log4j/docs/webstart/chainsaw/log4j-chainsaw-vfs.jar;VFS
 extension/a to Chainsaw/li
+   li[VFS] Download a 
href=http://cvs.apache.org/builds/jakarta-commons/nightly/commons-vfs/;VFS/a/li
+   li[VFS] Download a 
href=http://jakarta.apache.org/site/downloads/downloads_commons-logging.cgi;Commons
 Logging/a Jars/li
+   li[VFS] Download the VFS a 
href=http://jakarta.apache.org/commons/vfs/download.html;filestore 
implementation jars/a you wish to use/li
+   
liPlace all these jars in your .chainsaw/plugins 
directory (the .chainsaw directory is in your home directory)/li
-   liStart Chainsaw, which should now recognize the 
existence of VFS components and allow you to use such things as the 
VFSLogFilePatternReceiver/li
+   liStart Chainsaw, which should now recognize the 
existence of these components and allow you to use them./li
/ol

svn commit: r382248 - /logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.html

2006-03-01 Thread psmith
Author: psmith
Date: Wed Mar  1 18:45:59 2006
New Revision: 382248

URL: http://svn.apache.org/viewcvs?rev=382248view=rev
Log:
typo's, corrections and clarifications.

Modified:

logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.html

Modified: 
logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.html
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.html?rev=382248r1=382247r2=382248view=diff
==
--- 
logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.html
 (original)
+++ 
logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.html
 Wed Mar  1 18:45:59 2006
@@ -31,7 +31,8 @@
 h2Interesting... So what do I need to use ZeroConf with Chainsaw  
log4j?/h2
 p
 The log4j team has created an additional JAR file that can be added to your 
existing
-application to enable ZeroConf configuration. You just need to download the 
codelog4j-zeroconf.jar/code and the JmDNS package and add 
+application to enable ZeroConf configuration. You just need to download the 
codelog4j-zeroconf.jar/code and the JmDNS package (you must use
+at least version 1.0 of JmDNS) and add 
 both JARs to your application's classpath. /p
 p Then change your references from codeSocketHubAppender/code
 to codebZeroConf/bSocketHubAppender/code. (We recommend you change the 
'name' propety from it's default to make it easy for you to use, other
@@ -52,7 +53,7 @@
 /pre
 p
 Once you have started your application using this new appender, then from 
within Chainsaw, the ZeroConf tab will show detected
-applications.  You can simply double click on the detected app, and Chainsaw 
will connect a Receiver to it.  You can even tick the Auto-Connet
+applications.  You can simply double click on the detected app, and Chainsaw 
will connect a Receiver to it.  You can even tick the Auto-Connect
 check box, and next time Chainsaw see's this application, it will 
automatically connect to it.
 /p
 h2Cool... But I have some applications that use log4j 1.2.x.  Will it still 
work?/h2



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r382249 - /logging/chainsaw/trunk/build.xml

2006-03-01 Thread psmith
Author: psmith
Date: Wed Mar  1 18:47:14 2006
New Revision: 382249

URL: http://svn.apache.org/viewcvs?rev=382249view=rev
Log:
Changed the distribution mechanism so that all distributions exclude the DB  
JMS
bits and pieces, because it just won't work like that.

Everyone just has to put these jars is the .chainsaw/plugins directory like 
VFS. *sigh*.

Modified:
logging/chainsaw/trunk/build.xml

Modified: logging/chainsaw/trunk/build.xml
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/build.xml?rev=382249r1=382248r2=382249view=diff
==
--- logging/chainsaw/trunk/build.xml (original)
+++ logging/chainsaw/trunk/build.xml Wed Mar  1 18:47:14 2006
@@ -317,19 +317,14 @@
!--include name=webstart*.jar/ --
/fileset
/copy
-   !-- TODO When zeroconf is ready, remove this! --
-   delete
-   fileset  dir=webstart-dist
-   include name=*zeroconf*/
-   include name=jmdns*/
-   /fileset
-   /delete
-   
+   

createshellscripts outputLocation=webstart-dist scriptType=shell
fileset dir=webstart-dist includes=*.jar
exclude name=commons*.jar/
exclude name=*vfs*.jar/
+   exclude name=*-jms-*.jar/
+   exclude name=*-db-*.jar/
/fileset
/createshellscripts
 
@@ -338,6 +333,8 @@
fileset dir=webstart-dist includes=*.jar
exclude name=commons*.jar/
exclude name=*vfs*.jar/
+   exclude name=*-jms-*.jar/
+   exclude name=*-db-*.jar/
/fileset
/createshellscripts   
 
@@ -356,6 +353,10 @@
 include name=*.jar/
 include name=*.bat/
 include name=*.sh/
+   exclude name=commons*.jar/
+   exclude name=*vfs*.jar/
+   exclude name=*-jms-*.jar/
+   exclude name=*-db-*.jar/
   /zipfileset
 /zip
   /target



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r382250 - in /logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw: help/release-notes.html version/VersionManager.java

2006-03-01 Thread psmith
Author: psmith
Date: Wed Mar  1 18:47:49 2006
New Revision: 382250

URL: http://svn.apache.org/viewcvs?rev=382250view=rev
Log:
Updated release notes for release.

Modified:

logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/help/release-notes.html

logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/version/VersionManager.java

Modified: 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/help/release-notes.html
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/help/release-notes.html?rev=382250r1=382249r2=382250view=diff
==
--- 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/help/release-notes.html
 (original)
+++ 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/help/release-notes.html
 Wed Mar  1 18:47:49 2006
@@ -10,6 +10,10 @@
 bNOTE:/b The mechanism and format used to persist settings in Chainsaw is 
subject to change during this alpha phase.  If you are experiencing problems 
displaying events in Chainsaw, please delete everything in the 
$user.dir/.chainsaw directory.
 br
 h11.99.99/h2
+h202 March 2006/h2
+ul
+liFixed distribution mechanism so that DB and JMS receiver stuff can also be 
supported in Webstart mode./li
+/ul
 h225 February 2006/h2
 ul
 liAdded a GUI option for VFSLogFilePatternReceiver, enabled by setting the 
'promptForUserInfo' param to true./li

Modified: 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/version/VersionManager.java
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/version/VersionManager.java?rev=382250r1=382249r2=382250view=diff
==
--- 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/version/VersionManager.java
 (original)
+++ 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/version/VersionManager.java
 Wed Mar  1 18:47:49 2006
@@ -10,7 +10,7 @@
 
 private static final VersionManager instance = new VersionManager();
 
-private static final String VERSION_INFO = 1.99.99 (25 February 2006);
+private static final String VERSION_INFO = 1.99.99 (02 March 2006);
 
 public static final VersionManager getInstance() {
 return instance;



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r382253 - /logging/chainsaw/tags/release_20060302/

2006-03-01 Thread psmith
Author: psmith
Date: Wed Mar  1 18:56:59 2006
New Revision: 382253

URL: http://svn.apache.org/viewcvs?rev=382253view=rev
Log:
Creating March 2nd 2006 release tag.

Added:
logging/chainsaw/tags/release_20060302/
  - copied from r382252, logging/chainsaw/trunk/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r382258 - in /logging/log4j/trunk: docs/chainsaw.html src/xdocs/chainsaw.xml

2006-03-01 Thread psmith
Author: psmith
Date: Wed Mar  1 19:07:45 2006
New Revision: 382258

URL: http://svn.apache.org/viewcvs?rev=382258view=rev
Log:
Whoops, one always see's this right afterwards... 

Modified:
logging/log4j/trunk/docs/chainsaw.html
logging/log4j/trunk/src/xdocs/chainsaw.xml

Modified: logging/log4j/trunk/docs/chainsaw.html
URL: 
http://svn.apache.org/viewcvs/logging/log4j/trunk/docs/chainsaw.html?rev=382258r1=382257r2=382258view=diff
==
--- logging/log4j/trunk/docs/chainsaw.html (original)
+++ logging/log4j/trunk/docs/chainsaw.html Wed Mar  1 19:07:45 2006
@@ -55,7 +55,7 @@
   Chainsaw v2 has it's roots from the original Chainsaw utility written by 
Oliver Burn, 
   and with inspiration from the Log Factor 5 utility contributed by 
ThoughtWorks Inc. /p

h1Download/strong/h1
-pLatest Build Date: 2006-02-09 (SVN tag 
'release_20060209')
+pLatest Build Date: 2006-03-02 (SVN tag 
'release_20060302')
  /p
 p
ul

Modified: logging/log4j/trunk/src/xdocs/chainsaw.xml
URL: 
http://svn.apache.org/viewcvs/logging/log4j/trunk/src/xdocs/chainsaw.xml?rev=382258r1=382257r2=382258view=diff
==
--- logging/log4j/trunk/src/xdocs/chainsaw.xml (original)
+++ logging/log4j/trunk/src/xdocs/chainsaw.xml Wed Mar  1 19:07:45 2006
@@ -18,7 +18,7 @@
 /section
 
  section name=Download
- pLatest Build Date: 2006-02-09 (SVN tag 'release_20060209')
+ pLatest Build Date: 2006-03-02 (SVN tag 'release_20060302')
  /p
  p
ul



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r380234 - /logging/chainsaw/trunk/build.xml

2006-02-23 Thread psmith
Author: psmith
Date: Thu Feb 23 13:49:49 2006
New Revision: 380234

URL: http://svn.apache.org/viewcvs?rev=380234view=rev
Log:
Bit of a hack for gump.  The log4j main source code is not available during
a gump run, so I have set a 'gump' flag in the chainsaw gump run, which disables
generation of the JavaDoc for ALL receivers.

That's all I can think of doing for now, ideas appreciated.

Modified:
logging/chainsaw/trunk/build.xml

Modified: logging/chainsaw/trunk/build.xml
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/build.xml?rev=380234r1=380233r2=380234view=diff
==
--- logging/chainsaw/trunk/build.xml (original)
+++ logging/chainsaw/trunk/build.xml Thu Feb 23 13:49:49 2006
@@ -163,10 +163,35 @@
 /java
   /target
 
-  !-- = --
+   
+   !-- this target can't be run in Gump mode, because the external 
project won't be available --
+   target name=javaDocLog4jReceivers unless=gump
+   
+   !-- JavaDoc up some Receiver and other stuff we want to be 
able to ship with Chainsaw--
+   javadoc sourcepath=${java.source.dir}
+destdir=${javac.dest}
+version=true
+author=true
+use=true
+doctitle=log4j version ${version}lt;brgt;API 
Specification
+windowtitle=Log4j Version ${version}
+header=lt;bgt;Log4j ${version}lt;/bgt;
+bottom=Copyright 2000-2003 Apache Software Foundation.
+
+ fileset dir=src/ defaultexcludes=yes
+   include name=**/*Receiver.java /
+ /fileset
+   fileset dir=${log4j.src}/src/ defaultexcludes=yes
+ include name=**/*Receiver.java /
+   /fileset  
+   classpath refid=compile.classpath/
+   /javadoc 
+   /target
+
+   !-- = 
--
   !-- Create log4j-chainsaw.jar, excluding everything else  --
   !-- = --
-  target name=chainsaw.jar depends=build.chainsaw, BuildZeroConfJar
+  target name=chainsaw.jar depends=build.chainsaw, BuildZeroConfJar, 
javaDocLog4jReceivers
 delete
   fileset dir=${jar.dest}
 include name=${log4j-chainsaw.jar}/
@@ -176,27 +201,6 @@
copy todir=${javac.dest}
  fileset dir=src/java includes=**/chainsaw/**/*/
/copy
-   
-!-- JavaDoc up some Receiver and other stuff we want to be able to ship 
with Chainsaw--
-javadoc sourcepath=${java.source.dir}
- destdir=${javac.dest}
- version=true
- author=true
- use=true
- doctitle=log4j version ${version}lt;brgt;API Specification
- windowtitle=Log4j Version ${version}
- header=lt;bgt;Log4j ${version}lt;/bgt;
- bottom=Copyright 2000-2003 Apache Software Foundation.
- 
-  fileset dir=src/ defaultexcludes=yes
-include name=**/*Receiver.java /
-  /fileset
-fileset dir=${log4j.src}/src/ defaultexcludes=yes
-  include name=**/*Receiver.java /
-/fileset  
-   classpath refid=compile.classpath/
-
-/javadoc
   
   
 jar jarfile=${jar.dest}/${log4j-chainsaw.jar} basedir=${javac.dest}



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r380310 - in /logging/log4j/trunk: docs/chainsaw.html src/xdocs/chainsaw.xml

2006-02-23 Thread psmith
Author: psmith
Date: Thu Feb 23 18:35:55 2006
New Revision: 380310

URL: http://svn.apache.org/viewcvs?rev=380310view=rev
Log:
Added documentation about how to configure ZeroConf stuff for one's application
including links to the stuff required.

Modified:
logging/log4j/trunk/docs/chainsaw.html
logging/log4j/trunk/src/xdocs/chainsaw.xml

Modified: logging/log4j/trunk/docs/chainsaw.html
URL: 
http://svn.apache.org/viewcvs/logging/log4j/trunk/docs/chainsaw.html?rev=380310r1=380309r2=380310view=diff
==
--- logging/log4j/trunk/docs/chainsaw.html (original)
+++ logging/log4j/trunk/docs/chainsaw.html Thu Feb 23 18:35:55 2006
@@ -76,7 +76,8 @@
  lia href=#InstallationInstallation/a/li
  lia href=#GettingStartedGetting Started/a/li
  lia href=#TutorialTutorial and User Manual/a/li
- !--lia href=#ScreenshotsScreenshots/a/li--
+ lia href=#ZeroConfZeroConf - Zero Configuration/a/li
+ !--lia href=#ScreenshotsScreenshots/a/li--
  /ul

h1So what is it really?/strong/h1
 pa name=WhatIsIt /aIt's a 
GUI-based Log viewer. A picture tells a thousand words.../p
@@ -120,13 +121,37 @@
/ol
/p
 pThis applies to 
distributions./p
+   
h1ZeroConf - Zero Configuration/strong/h1
+pa name=ZeroConf /Chainsaw has 
ZeroConf elements embedded within it, but you'll need to add a few things
+   to your application to enable byour/b application./p
+pDownload:/p
+ol
+   lia 
href=http://logging.apache.org/log4j/docs/webstart/chainsaw/log4j-zeroconf.zip;log4j
 ZeroConf extension/a/li
+   lia 
href=http://sourceforge.net/projects/jmdns/;JmDNS bundle/a/li
+   liAdd the codelog4j-zeroconf.jar/code and the 
codejmdns.jar/code from these bundles and add them to your 
+   application's classpath. /li
+   liModify your log4j configuration so that it use the 
ZeroConfSocketHubAppender.  Here is a complete log4j.xml file that you can use 
as a base:
+   pre
+lt;log4j:configuration debug=false threshold=debug  
xmlns:log4j=http://jakarta.apache.org/log4j/gt;
+lt;appender name=zeroconf 
class=org.apache.log4j.net.ZeroConfSocketHubAppendergt;
+lt;param name=Name value=MyZeroConfSockeHubAppender /gt;
+lt;/appendergt;
+lt;!--ROOT Logger--gt;
+lt;rootgt;
+lt;level value=INFO /gt;
+lt;appender-ref ref=zeroconf /gt;
+lt;/rootgt;
+lt;/log4j:configurationgt;
+   /pre
+   /li
+   /ol
  
 
   
-  hr/
+hr/
 
   
-   
 
+   
 
 
  
 !-- FOOTER --

Modified: logging/log4j/trunk/src/xdocs/chainsaw.xml
URL: 
http://svn.apache.org/viewcvs/logging/log4j/trunk/src/xdocs/chainsaw.xml?rev=380310r1=380309r2=380310view=diff
==
--- logging/log4j/trunk/src/xdocs/chainsaw.xml (original)
+++ logging/log4j/trunk/src/xdocs/chainsaw.xml Thu Feb 23 18:35:55 2006
@@ -40,7 +40,8 @@
  lia href=#InstallationInstallation/a/li
  lia href=#GettingStartedGetting Started/a/li
  lia href=#TutorialTutorial and User Manual/a/li
- !--lia href=#ScreenshotsScreenshots/a/li--
+ lia href=#ZeroConfZeroConf - Zero Configuration/a/li
+ !--lia href=#ScreenshotsScreenshots/a/li--
  /ul
 /section
 
@@ -100,6 +101,30 @@
 !--section name=Screenshots
pa name=Screenshots/Here's a few more screenshots 
to whet your appetite:/p
 /section--
-
+   section name=ZeroConf - Zero Configuration
+   pa name=ZeroConf/Chainsaw has ZeroConf elements embedded 
within it, but you'll need to add a few things
+   to your application to enable byour/b application for 
ZeroConf./p
+   pDownload:/p
+   ol
+   lia 
href=http://logging.apache.org/log4j/docs/webstart/chainsaw/log4j-zeroconf.zip;log4j
 ZeroConf extension/a/li
+   lia 
href=http://sourceforge.net/projects/jmdns/;JmDNS bundle/a/li
+   liAdd

svn commit: r378673 - /logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogUI.java

2006-02-17 Thread psmith
Author: psmith
Date: Fri Feb 17 17:25:18 2006
New Revision: 378673

URL: http://svn.apache.org/viewcvs?rev=378673view=rev
Log:
Fix for change of Help URL, if the Welcome tab wasn't the currently selected 
tab,
you didn't get to see the help menu you had just selected.

Modified:
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogUI.java

Modified: logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogUI.java
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogUI.java?rev=378673r1=378672r2=378673view=diff
==
--- logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogUI.java 
(original)
+++ logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogUI.java Fri 
Feb 17 17:25:18 2006
@@ -561,6 +561,7 @@
   if(!getTabbedPane().containsWelcomePanel()) {
   addWelcomePanel();
   }
+  getTabbedPane().setSelectedComponent(welcomePanel);
   }
   
   /**



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r378090 - /logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.java

2006-02-15 Thread psmith
Author: psmith
Date: Wed Feb 15 12:53:53 2006
New Revision: 378090

URL: http://svn.apache.org/viewcvs?rev=378090view=rev
Log:
Optimize imports, removing a unused import that is actually from the test 
source tree
which gump doesn't like one bit.

Modified:

logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.java

Modified: 
logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.java
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.java?rev=378090r1=378089r2=378090view=diff
==
--- 
logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.java
 (original)
+++ 
logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.java
 Wed Feb 15 12:53:53 2006
@@ -20,10 +20,7 @@
 import javax.swing.AbstractAction;
 import javax.swing.Icon;
 import javax.swing.ImageIcon;
-import javax.swing.JCheckBox;
-import javax.swing.JComponent;
 import javax.swing.JFrame;
-import javax.swing.JLabel;
 import javax.swing.JMenu;
 import javax.swing.JMenuBar;
 import javax.swing.JMenuItem;
@@ -35,7 +32,6 @@
 import javax.swing.SwingUtilities;
 import javax.swing.event.TableModelEvent;
 import javax.swing.event.TableModelListener;
-import javax.swing.table.DefaultTableCellRenderer;
 
 import org.apache.log4j.BasicConfigurator;
 import org.apache.log4j.LogManager;
@@ -47,7 +43,6 @@
 import org.apache.log4j.chainsaw.prefs.SettingsManager;
 import org.apache.log4j.net.SocketHubReceiver;
 import org.apache.log4j.net.ZeroConfSocketHubAppender;
-import org.apache.log4j.net.ZeroConfSocketHubAppenderTestBed;
 import org.apache.log4j.net.Zeroconf4log4j;
 import org.apache.log4j.plugins.Plugin;
 import org.apache.log4j.plugins.PluginEvent;



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r376078 - /logging/chainsaw/trunk/packaging/chainsawWebStart.jnlp

2006-02-08 Thread psmith
Author: psmith
Date: Wed Feb  8 13:33:25 2006
New Revision: 376078

URL: http://svn.apache.org/viewcvs?rev=376078view=rev
Log:
added System Property suggested by Scott to enable logging of VFS components
inside Chainsaw.

Modified:
logging/chainsaw/trunk/packaging/chainsawWebStart.jnlp

Modified: logging/chainsaw/trunk/packaging/chainsawWebStart.jnlp
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/packaging/chainsawWebStart.jnlp?rev=376078r1=376077r2=376078view=diff
==
--- logging/chainsaw/trunk/packaging/chainsawWebStart.jnlp (original)
+++ logging/chainsaw/trunk/packaging/chainsawWebStart.jnlp Wed Feb  8 13:33:25 
2006
@@ -21,6 +21,7 @@
 j2se version=1.4+ max-heap-size=256m/ 
 j2se version=1.3+ max-heap-size=256m/ 
 @JARS@
+   property name=org.apache.commons.logging.Log 
value=org.apache.commons.logging.impl.Log4JLogger/
   /resources 
   application-desc main-class=org.apache.log4j.chainsaw.LogUI/ 
 /jnlp 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r376082 - in /logging/chainsaw/trunk: build.properties.sample build.xml src/java/org/apache/log4j/chainsaw/help/release-notes.html src/java/org/apache/log4j/chainsaw/version/VersionManager

2006-02-08 Thread psmith
Author: psmith
Date: Wed Feb  8 13:37:12 2006
New Revision: 376082

URL: http://svn.apache.org/viewcvs?rev=376082view=rev
Log:
Fix for Bug #38582.  Since Chainsaw moved out into it's own SVN repo,
it appears that the distribution no longer built all the Receiver Java Doc 
(because
they are still in the log4j source path.

Changed the build sequence so that to get the JavaDoc for Receivers requires 
the 
location of the log4j source code.  Failing to have this just means that 
Chainsaw
doesn't have all the JavaDoc embedded.

Modified:
logging/chainsaw/trunk/build.properties.sample
logging/chainsaw/trunk/build.xml

logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/help/release-notes.html

logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/version/VersionManager.java

Modified: logging/chainsaw/trunk/build.properties.sample
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/build.properties.sample?rev=376082r1=376081r2=376082view=diff
==
--- logging/chainsaw/trunk/build.properties.sample (original)
+++ logging/chainsaw/trunk/build.properties.sample Wed Feb  8 13:37:12 2006
@@ -16,7 +16,8 @@
 # See http://jakarta.apache.org/commons/sandbox/vfs/download.html for 
 # file system-specific jars required when running Chainsaw with a 
VFSLogFilePatternReceiver
 #
-# NOTE: VFS requires Commons logging JAR as well, otherwise it won't work.
+# NOTE: VFS requires Commons logging JAR as well, otherwise it won't work, 
just grab 
+# the API jar and place it in this directory alongside VFS jar.
 
 # Place all the dependencies in this directory (except ORO)
 # Dependencies directory

Modified: logging/chainsaw/trunk/build.xml
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/build.xml?rev=376082r1=376081r2=376082view=diff
==
--- logging/chainsaw/trunk/build.xml (original)
+++ logging/chainsaw/trunk/build.xml Wed Feb  8 13:37:12 2006
@@ -38,6 +38,7 @@
fileset dir=${deps.dir}
  include name=*.jar/
/fileset
+   pathelement location=${jms.jar}/
   /path
 
   path id=runtime.classpath
@@ -182,7 +183,6 @@
  version=true
  author=true
  use=true
- overview=${jar.dest}/overview.html
  doctitle=log4j version ${version}lt;brgt;API Specification
  windowtitle=Log4j Version ${version}
  header=lt;bgt;Log4j ${version}lt;/bgt;
@@ -191,7 +191,10 @@
   fileset dir=src/ defaultexcludes=yes
 include name=**/*Receiver.java /
   /fileset
-  classpath refid=compile.classpath/
+fileset dir=${log4j.src}/src/ defaultexcludes=yes
+  include name=**/*Receiver.java /
+/fileset  
+   classpath refid=compile.classpath/
 
 /javadoc
   
@@ -320,7 +323,10 @@


createshellscripts outputLocation=webstart-dist scriptType=shell
-   fileset dir=webstart-dist includes=*.jar/
+   fileset dir=webstart-dist includes=*.jar
+   exclude name=commons*.jar/
+   exclude name=*vfs*.jar/
+   /fileset
/createshellscripts
 
!-- Webstart distribution can't have VFS because of stupid 
classloading rules, so we exclude it--
@@ -364,7 +370,10 @@
copy file=${webstart-dependant-receivers.jar} 
todir=iSaw-dist/
copy file=${log4j-chainsaw.jar} todir=iSaw-dist/
copy todir=iSaw-dist
-   fileset dir=lib/
+   fileset dir=lib
+   exclude name=commons*.jar/
+   exclude name=*vfs*.jar/
+   /fileset
/copy

taskdef name=jarbundler

Modified: 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/help/release-notes.html
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/help/release-notes.html?rev=376082r1=376081r2=376082view=diff
==
--- 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/help/release-notes.html
 (original)
+++ 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/help/release-notes.html
 Wed Feb  8 13:37:12 2006
@@ -8,13 +8,16 @@
 h1Release Notes/h2
 
 h11.99.99/h2
-
-h206 January 2006/h2
+h209 February 2006/h2
+ul
+liReceiver help files were missing from the distribution. /li
+/ul
+h206 February 2006/h2
 ul
 liSave/load of custom event columns now supported, as well as column 
order./li
 /ul
 ulbNOTE:/b The mechanism and format used to persist settings in Chainsaw 
is changing significantly with this release, and is subject to change during 
this alpha phase.  If you are experiencing problems displaying events in 
Chainsaw, please delete

svn commit: r376086 - /logging/chainsaw/trunk/build.properties.sample

2006-02-08 Thread psmith
Author: psmith
Date: Wed Feb  8 13:43:24 2006
New Revision: 376086

URL: http://svn.apache.org/viewcvs?rev=376086view=rev
Log:
Fix for Bug #38582.  Since Chainsaw moved out into it's own SVN repo,
it appears that the distribution no longer built all the Receiver Java Doc 
(because
they are still in the log4j source path.

Changed the build sequence so that to get the JavaDoc for Receivers requires 
the 
location of the log4j source code.  Failing to have this just means that 
Chainsaw
doesn't have all the JavaDoc embedded.

Modified:
logging/chainsaw/trunk/build.properties.sample

Modified: logging/chainsaw/trunk/build.properties.sample
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/build.properties.sample?rev=376086r1=376085r2=376086view=diff
==
--- logging/chainsaw/trunk/build.properties.sample (original)
+++ logging/chainsaw/trunk/build.properties.sample Wed Feb  8 13:43:24 2006
@@ -21,4 +21,8 @@
 
 # Place all the dependencies in this directory (except ORO)
 # Dependencies directory
-deps.dir=lib
\ No newline at end of file
+deps.dir=lib
+
+# The location of the log4j source code (unpacked), required if you want to 
build the HTML JavaDoc for the Receivers 
+# into the Chainsaw GUI.  This is a MUST for building the complete distribution
+log4j.src=../log4j/



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r374949 - /logging/log4j/trunk/src/java/org/apache/log4j/net/JMSAppender.java

2006-02-04 Thread psmith
Author: psmith
Date: Sat Feb  4 16:01:34 2006
New Revision: 374949

URL: http://svn.apache.org/viewcvs?rev=374949view=rev
Log:
Fix for Bug #38512, JMSAppender does not mark itself as active after it's 
activateOptions
method is called.

This is because of 2 reasons:

1) the if check does an == check instead of a != check on the topicPublisher
2) After correct initialization,  it fails to call super.activateOptions() to 
flag it as active.

Modified:
logging/log4j/trunk/src/java/org/apache/log4j/net/JMSAppender.java

Modified: logging/log4j/trunk/src/java/org/apache/log4j/net/JMSAppender.java
URL: 
http://svn.apache.org/viewcvs/logging/log4j/trunk/src/java/org/apache/log4j/net/JMSAppender.java?rev=374949r1=374948r2=374949view=diff
==
--- logging/log4j/trunk/src/java/org/apache/log4j/net/JMSAppender.java 
(original)
+++ logging/log4j/trunk/src/java/org/apache/log4j/net/JMSAppender.java Sat Feb  
4 16:01:34 2006
@@ -234,10 +234,14 @@
Error while activating options for appender named [ + name + ]., e);
 }
 
-if (this.topicConnection != null  this.topicSession != null  
this.topicPublisher == null) {
+
+if (this.topicConnection != null  this.topicSession != null  
this.topicPublisher != null) {
   inOrder = true;
 } else {
   inOrder = false;
+}
+if(inOrder) {
+super.activateOptions();
 }
   }
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r374802 - in /logging/log4j/trunk: docs/chainsaw.html src/xdocs/chainsaw.xml

2006-02-03 Thread psmith
Author: psmith
Date: Fri Feb  3 16:59:55 2006
New Revision: 374802

URL: http://svn.apache.org/viewcvs?rev=374802view=rev
Log:
Forgot to check these in the other day, changes related to the fact that all 
distribution
require special instructions with respect to VFS.

Modified:
logging/log4j/trunk/docs/chainsaw.html
logging/log4j/trunk/src/xdocs/chainsaw.xml

Modified: logging/log4j/trunk/docs/chainsaw.html
URL: 
http://svn.apache.org/viewcvs/logging/log4j/trunk/docs/chainsaw.html?rev=374802r1=374801r2=374802view=diff
==
--- logging/log4j/trunk/docs/chainsaw.html (original)
+++ logging/log4j/trunk/docs/chainsaw.html Fri Feb  3 16:59:55 2006
@@ -105,7 +105,7 @@
 pa name=ExtraDocs /aChainsaw 
already includes help with
   with a Quick Reference and a Tutorial to get you started, all viewable 
from bwithin the GUI/b!. A User Manual will be made available around 
release time. /p

h1Distribution Notes/strong/h1
-pa name=VFSNotes /Due to Java Web 
Start's classloading rules, it is impossible to ship the a 
href=http://jakarta.apache.org/commons/vfs;Jakarta Commons VFS/a extension 
to Chainsaw.
+pa name=VFSNotes /Due to Java 
classloading rules, it is impossible to ship the a 
href=http://jakarta.apache.org/commons/vfs;Jakarta Commons VFS/a extension 
to Chainsaw.
Several VFS filestore implementation jars cannot be shipped 
with Chainsaw because of licensing issues.  The log4j dev team has chosen to 
not distribute VFS
with the Web Start version, however you can follow these steps 
to enable the VFS components inside Chainsaw.
ol
@@ -117,8 +117,7 @@
liStart Chainsaw, which should now recognize the 
existence of VFS components and allow you to use such things as the 
VFSLogFilePatternReceiver/li
/ol
/p
-pThe Unix/DOS batch file and 
OSX distribution already include the base VFS component jars, so you just need 
to download the filestore implementation jars and place them 
-   in the plugins directory./p
+pThis applies to all 
distributions./p
  
 
   

Modified: logging/log4j/trunk/src/xdocs/chainsaw.xml
URL: 
http://svn.apache.org/viewcvs/logging/log4j/trunk/src/xdocs/chainsaw.xml?rev=374802r1=374801r2=374802view=diff
==
--- logging/log4j/trunk/src/xdocs/chainsaw.xml (original)
+++ logging/log4j/trunk/src/xdocs/chainsaw.xml Fri Feb  3 16:59:55 2006
@@ -81,7 +81,7 @@
 /section
 
section name=Distribution Notes
-   pa name=VFSNotes/Due to Java Web Start's classloading 
rules, it is impossible to ship the a 
href=http://jakarta.apache.org/commons/vfs;Jakarta Commons VFS/a extension 
to Chainsaw.
+   pa name=VFSNotes/Due to Java classloading rules, it is 
impossible to ship the a href=http://jakarta.apache.org/commons/vfs;Jakarta 
Commons VFS/a extension to Chainsaw.
Several VFS filestore implementation jars cannot be shipped 
with Chainsaw because of licensing issues.  The log4j dev team has chosen to 
not distribute VFS
with the Web Start version, however you can follow these steps 
to enable the VFS components inside Chainsaw.
ol
@@ -93,8 +93,7 @@
liStart Chainsaw, which should now recognize the 
existence of VFS components and allow you to use such things as the 
VFSLogFilePatternReceiver/li
/ol
/p
-   pThe Unix/DOS batch file and OSX distribution already include 
the base VFS component jars, so you just need to download the filestore 
implementation jars and place them 
-   in the plugins directory./p
+   pThis applies to distributions./p
/section
 !--section name=Screenshots
pa name=Screenshots/Here's a few more screenshots 
to whet your appetite:/p



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r374289 - in /logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw: help/release-notes.html version/VersionManager.java

2006-02-01 Thread psmith
Author: psmith
Date: Wed Feb  1 23:14:32 2006
New Revision: 374289

URL: http://svn.apache.org/viewcvs?rev=374289view=rev
Log:
Update version and release notes (kinda forgotten what's changed 
since November...) in preparation for release.

Modified:

logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/help/release-notes.html

logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/version/VersionManager.java

Modified: 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/help/release-notes.html
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/help/release-notes.html?rev=374289r1=374288r2=374289view=diff
==
--- 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/help/release-notes.html
 (original)
+++ 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/help/release-notes.html
 Wed Feb  1 23:14:32 2006
@@ -11,6 +11,10 @@
 
 h221 November 2005/h2
 ul
+liRevamped build system for easier maintenance and deployment of builds. 
Fixed issues with Commons VFS and Webstart./li
+/ul
+h221 November 2005/h2
+ul
 liAdded Mac OS X integration, and used jarbundler to create a Chainsaw.app 
bundle for a native OS X distribution of Chainsaw./li
 /ul
 

Modified: 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/version/VersionManager.java
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/version/VersionManager.java?rev=374289r1=374288r2=374289view=diff
==
--- 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/version/VersionManager.java
 (original)
+++ 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/version/VersionManager.java
 Wed Feb  1 23:14:32 2006
@@ -10,7 +10,7 @@
 
 private static final VersionManager instance = new VersionManager();
 
-private static final String VERSION_INFO = 1.99.99 (21 November 2005);
+private static final String VERSION_INFO = 1.99.99 (02 February 2006);
 
 public static final VersionManager getInstance() {
 return instance;



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r374290 - /logging/chainsaw/tags/release_20060202/

2006-02-01 Thread psmith
Author: psmith
Date: Wed Feb  1 23:16:21 2006
New Revision: 374290

URL: http://svn.apache.org/viewcvs?rev=374290view=rev
Log:
Creating tag for release on 2nd February 2006.

Added:
logging/chainsaw/tags/release_20060202/
  - copied from r374289, logging/chainsaw/trunk/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r373259 - in /logging/log4j/trunk: docs/chainsaw.html src/xdocs/chainsaw.xml

2006-01-28 Thread psmith
Author: psmith
Date: Sat Jan 28 15:26:55 2006
New Revision: 373259

URL: http://svn.apache.org/viewcvs?rev=373259view=rev
Log:
Updated notes about how to use VFS  Chainsaw, explicitly adding
information about the need to download the separate Chainsaw-VFS
jar.

Modified:
logging/log4j/trunk/docs/chainsaw.html
logging/log4j/trunk/src/xdocs/chainsaw.xml

Modified: logging/log4j/trunk/docs/chainsaw.html
URL: 
http://svn.apache.org/viewcvs/logging/log4j/trunk/docs/chainsaw.html?rev=373259r1=373258r2=373259view=diff
==
--- logging/log4j/trunk/docs/chainsaw.html (original)
+++ logging/log4j/trunk/docs/chainsaw.html Sat Jan 28 15:26:55 2006
@@ -62,7 +62,7 @@
lia 
href=http://logging.apache.org/log4j/docs/webstart/chainsaw/chainsaw.dmg;OS X 
'native' distribution/a font size=-1(uses Java still, but looks like a 
real OSX application)/font/li
lia 
href=http://logging.apache.org/log4j/docs/webstart/chainsaw/chainsaw-bundle.zip;Unix/Dos
 standalone/a font size=-1(.bat/.sh)/font/li
 p /  ul
-   lifont size=-1a 
href=#VFSNotesImportant Distribution notes/a/font/li
+   lifont size=-1a 
href=#VFSNotesbImportant Distribution notes!!/Using VFS with 
Chainsaw/b/a/font/li
/ul
/ul
  /p
@@ -109,7 +109,9 @@
Several VFS filestore implementation jars cannot be shipped 
with Chainsaw because of licensing issues.  The log4j dev team has chosen to 
not distribute VFS
with the Web Start version, however you can follow these steps 
to enable the VFS components inside Chainsaw.
ol
-   liDownload VFS amp; Commons Logging Jars/li
+   liDownload the a 
href=http://logging.apache.org/log4j/docs/webstart/chainsaw/log4j-chainsaw-vfs.jar;VFS
 extension/a to Chainsaw/li
+   liDownload a 
href=http://cvs.apache.org/builds/jakarta-commons/nightly/commons-vfs/;VFS/a/li
+   liDownload a 
href=http://jakarta.apache.org/site/downloads/downloads_commons-logging.cgi;Commons
 Logging/a Jars/li
liDownload the VFS a 
href=http://jakarta.apache.org/commons/vfs/download.html;filestore 
implementation jars/a you wish to use/li
liPlace all these jars in your .chainsaw/plugins 
directory (the .chainsaw directory is in your home directory)/li
liStart Chainsaw, which should now recognize the 
existence of VFS components and allow you to use such things as the 
VFSLogFilePatternReceiver/li

Modified: logging/log4j/trunk/src/xdocs/chainsaw.xml
URL: 
http://svn.apache.org/viewcvs/logging/log4j/trunk/src/xdocs/chainsaw.xml?rev=373259r1=373258r2=373259view=diff
==
--- logging/log4j/trunk/src/xdocs/chainsaw.xml (original)
+++ logging/log4j/trunk/src/xdocs/chainsaw.xml Sat Jan 28 15:26:55 2006
@@ -25,7 +25,7 @@
lia 
href=http://logging.apache.org/log4j/docs/webstart/chainsaw/chainsaw.dmg;OS X 
'native' distribution/a font size=-1(uses Java still, but looks like a 
real OSX application)/font/li
lia 
href=http://logging.apache.org/log4j/docs/webstart/chainsaw/chainsaw-bundle.zip;Unix/Dos
 standalone/a font size=-1(.bat/.sh)/font/li
 p/   ul
-   lifont size=-1a 
href=#VFSNotesImportant Distribution notes/a/font/li
+   lifont size=-1a 
href=#VFSNotesbImportant Distribution notes!!/Using VFS with 
Chainsaw/b/a/font/li
/ul
/ul
  /p
@@ -85,7 +85,9 @@
Several VFS filestore implementation jars cannot be shipped 
with Chainsaw because of licensing issues.  The log4j dev team has chosen to 
not distribute VFS
with the Web Start version, however you can follow these steps 
to enable the VFS components inside Chainsaw.
ol
-   liDownload VFS amp; Commons Logging Jars/li
+   liDownload the a 
href=http://logging.apache.org/log4j/docs/webstart/chainsaw/log4j-chainsaw-vfs.jar;VFS
 extension/a to Chainsaw/li
+   liDownload a 
href=http://cvs.apache.org/builds/jakarta-commons/nightly/commons-vfs/;VFS/a/li
+   liDownload a 
href=http://jakarta.apache.org/site/downloads/downloads_commons-logging.cgi;Commons
 Logging/a Jars/li
liDownload the VFS a 
href=http://jakarta.apache.org/commons/vfs/download.html;filestore 
implementation jars/a you wish to use/li
liPlace all these jars in your .chainsaw/plugins 
directory (the .chainsaw directory is in your home directory)/li
liStart Chainsaw, which should now recognize the 
existence of VFS components and allow you to use

svn commit: r373083 - /logging/log4j/trunk/src/xdocs/chainsaw.xml

2006-01-27 Thread psmith
Author: psmith
Date: Fri Jan 27 20:55:49 2006
New Revision: 373083

URL: http://svn.apache.org/viewcvs?rev=373083view=rev
Log:
Updated the Chainsaw details page with more distribution links,
plus some details about the VFS plugin and how to get it all working.

Removed the install section, as it is wildly out of date and
irrelavant with the 3 distributions we now have.

Modified:
logging/log4j/trunk/src/xdocs/chainsaw.xml

Modified: logging/log4j/trunk/src/xdocs/chainsaw.xml
URL: 
http://svn.apache.org/viewcvs/logging/log4j/trunk/src/xdocs/chainsaw.xml?rev=373083r1=373082r2=373083view=diff
==
--- logging/log4j/trunk/src/xdocs/chainsaw.xml (original)
+++ logging/log4j/trunk/src/xdocs/chainsaw.xml Fri Jan 27 20:55:49 2006
@@ -15,9 +15,23 @@
   projects, this new version was built upon inspirations, ideas and 
creations of others. 
   Chainsaw v2 has it's roots from the original Chainsaw utility written by 
Oliver Burn, 
   and with inspiration from the Log Factor 5 utility contributed by 
ThoughtWorks Inc. /p
-   pb*** Got Java Web Start installed?: a 
href=http://logging.apache.org/log4j/docs/webstart/chainsaw/chainsawWebStart.jnlp;[Launch
 now!]/a***/b/p
-   pIf you haven't got Java Web Start installed, then try this zipped 
distribution. a 
href=http://logging.apache.org/log4j/docs/webstart/chainsaw/chainsaw-bundle.zip;[Download]/a/p
-ul
+/section
+
+ section name=Download
+ p
+   ul
+   lia 
href=http://logging.apache.org/log4j/docs/webstart/chainsaw/chainsawWebStart.jnlp;Java
 Web Start img alt=WebStart distribution 
src=http://java.sun.com/products/jfc/tsc/sightings/images/webstart.small.jpg; 
border=0//a/li
+
+   lia 
href=http://logging.apache.org/log4j/docs/webstart/chainsaw/chainsaw.dmg;OS X 
'native' distribution/a font size=-1(uses Java still, but looks like a 
real OSX application)/font/li
+   lia 
href=http://logging.apache.org/log4j/docs/webstart/chainsaw/chainsaw-bundle.zip;Unix/Dos
 standalone/a font size=-1(.bat/.sh)/font/li
+p/   ul
+   lifont size=-1a 
href=#VFSNotesImportant Distribution notes/a/font/li
+   /ul
+   /ul
+ /p
+ /section
+ section name=Table of Contents
+   ul
  lia href=#WhatIsItSo what is it really?/a/li
  lia href=#QuickTourQuick Tour of Chainsaw features/a/li
  lia href=#ProjectStatusProject Status/Support/Feedback/a/li
@@ -60,37 +74,26 @@
libBuilt-in documentation and tutorial/b - HTML-based 
documentation included in the package./li
   /ul
 /section
-
-section name=Installation
-   a name=Installation#160;/a
-   pb*** Got Java Web Start installed?: a 
href=http://logging.apache.org/log4j/docs/webstart/chainsaw/chainsawWebStart.jnlp;[Launch
 now!]/a***/b/p
-   pOtherwise, if the above link does not work, then you 
will need to check out the jakarta-log4j module from the Apache CVS server
-   to build and run Chainsaw v2.  To make this easier, we 
have created an installation Ant script, you can download this 
-   by a href=install-chainsaw.xmlclicking 
here/a./p
-   PYou will need the following installed to utilise 
this installation script:/P
-   UL
-liJDK 1.3+ (1.4.2 is bistrongly/i/b 
recommeded)/li
-liAnt 1.5+/li
-liCVS (a href=http://www.cygwin.com/;Cygwin/a 
is handy for Windows users)/li
-   /UL
-   POnce you have downloaded and placed this script in a 
directory where you want Chainsaw v2 installed, you can type:/P
-   preant -f install-chainsaw.xml/pre
-   PThis will download everything you need to build and 
run Chainsaw v2./P
-   PWhen finally released, we plan to have Chainsaw v2 
available via Java WebStart./P
-/section
-
-section name=Getting Started
-   pa name=GettingStarted#160;/aIf you launched 
via Java Web Start, you should be ROCKING!  However, if you have used the above 
installer, you can codecd/code to tho codejakarta-log4j/code 
sub-directory and
-   type:/p
-   preant chainsaw/pre
-   PChainsaw v2 will be built and run!/P
-/section

 section name=Tutorial and User Manual
pa name=ExtraDocs#160;/aChainsaw already 
includes help with
   with a Quick Reference and a Tutorial to get you started, all viewable 
from bwithin the GUI/b!. A User Manual will be made available around 
release time. /p
 /section
 
+   section name=Distribution Notes
+   pa name=VFSNotes/Due to Java Web Start's classloading 
rules, it is impossible to ship the a 
href=http://jakarta.apache.org

svn commit: r371393 - /logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.java

2006-01-22 Thread psmith
Author: psmith
Date: Sun Jan 22 13:28:53 2006
New Revision: 371393

URL: http://svn.apache.org/viewcvs?rev=371393view=rev
Log:
Optimized the imports, removing one that is causing Gump failures.

Modified:

logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.java

Modified: 
logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.java
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.java?rev=371393r1=371392r2=371393view=diff
==
--- 
logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.java
 (original)
+++ 
logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.java
 Sun Jan 22 13:28:53 2006
@@ -5,7 +5,6 @@
 import java.awt.Container;
 import java.awt.Font;
 import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
 import java.awt.event.MouseAdapter;
 import java.awt.event.MouseEvent;
 import java.io.File;
@@ -22,8 +21,6 @@
 import javax.swing.AbstractAction;
 import javax.swing.BorderFactory;
 import javax.swing.Box;
-import javax.swing.BoxLayout;
-import javax.swing.DefaultListModel;
 import javax.swing.Icon;
 import javax.swing.ImageIcon;
 import javax.swing.JCheckBox;
@@ -55,7 +52,6 @@
 import org.apache.log4j.chainsaw.prefs.SettingsManager;
 import org.apache.log4j.net.SocketHubReceiver;
 import org.apache.log4j.net.ZeroConfSocketHubAppender;
-import org.apache.log4j.net.ZeroConfSocketHubAppenderTestBed;
 import org.apache.log4j.net.Zeroconf4log4j;
 import org.apache.log4j.plugins.Plugin;
 import org.apache.log4j.plugins.PluginEvent;



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r369178 - in /logging/chainsaw/trunk: anttasks-src/org/apache/chainsaw/ant/CreateShellScripts.java build.xml packaging/chainsawWebStart.jnlp

2006-01-14 Thread psmith
Author: psmith
Date: Sat Jan 14 20:59:46 2006
New Revision: 369178

URL: http://svn.apache.org/viewcvs?rev=369178view=rev
Log:
webstart build now auto-creates the JNLP file with all the jars 
used during the building.

Modified:

logging/chainsaw/trunk/anttasks-src/org/apache/chainsaw/ant/CreateShellScripts.java
logging/chainsaw/trunk/build.xml
logging/chainsaw/trunk/packaging/chainsawWebStart.jnlp

Modified: 
logging/chainsaw/trunk/anttasks-src/org/apache/chainsaw/ant/CreateShellScripts.java
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/anttasks-src/org/apache/chainsaw/ant/CreateShellScripts.java?rev=369178r1=369177r2=369178view=diff
==
--- 
logging/chainsaw/trunk/anttasks-src/org/apache/chainsaw/ant/CreateShellScripts.java
 (original)
+++ 
logging/chainsaw/trunk/anttasks-src/org/apache/chainsaw/ant/CreateShellScripts.java
 Sat Jan 14 20:59:46 2006
@@ -1,8 +1,13 @@
 package org.apache.chainsaw.ant;
 
+import java.io.BufferedReader;
 import java.io.File;
+import java.io.FileReader;
 import java.io.FileWriter;
 import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.Reader;
+import java.io.StringWriter;
 import java.io.Writer;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -54,9 +59,46 @@
 try {
 createUnixShellScript(outputLocationDir, filenames);
 createBatShellScript(outputLocationDir, filenames);
+createJNLP(outputLocationDir, filenames);
 } catch (Exception e) {
+e.printStackTrace();
 throw new BuildException(Failed to create Scripts,e);
 }
+}
+
+
+/**
+ * Creates a JNLP file for launching Chainsaw
+ * @param outputLocationDir
+ * @param filenames
+ * @throws IOException
+ */
+private void createJNLP(File outputLocationDir, Collection filenames) 
throws IOException {
+//String templateName = 
CreateShellScripts.class.getPackage().toString().replace('.', 
'/')+/chainsawWebStart.jnlp;
+//log(Using JNLP template:  + templateName);
+BufferedReader reader = new BufferedReader(new FileReader(new 
File(packaging/chainsawWebStart.jnlp)));
+
+// convert the file to a String
+StringBuffer buf = new StringBuffer(1024);
+String line;
+while((line=reader.readLine())!=null) {
+buf.append(line).append(\n);
+}
+
+StringBuffer jarBuf = new StringBuffer();
+for (Iterator iter = filenames.iterator(); iter.hasNext();) {
+String jar = (String) iter.next();
+jarBuf.append(\tjar href=\lib/+jar + \/\n);
+}
+// now replace the bits we want
+int jarStringLocation = buf.indexOf(@JARS@);
+buf.replace(jarStringLocation, jarStringLocation + 6, 
jarBuf.toString());
+//TODO replace the CODEBASE stuff
+
+File jnlp = new File(outputLocationDir, chainsawWebStart.jnlp);
+Writer writer = new FileWriter(jnlp);
+writer.write(buf.toString());
+writer.close();
 }
 
 public void addFileSet(FileSet fileSet) {

Modified: logging/chainsaw/trunk/build.xml
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/build.xml?rev=369178r1=369177r2=369178view=diff
==
--- logging/chainsaw/trunk/build.xml (original)
+++ logging/chainsaw/trunk/build.xml Sat Jan 14 20:59:46 2006
@@ -264,7 +264,11 @@
  /patternset
  classpath refid=compile.classpath/   
/javac
-   
+   copy todir=${javac.dest}
+   fileset dir=anttasks-src
+   include name=*.jnlp/
+   /fileset
+   /copy
taskdef name=createshellscripts 
classpathref=compile.classpath 
classname=org.apache.chainsaw.ant.CreateShellScripts /
/target


Modified: logging/chainsaw/trunk/packaging/chainsawWebStart.jnlp
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/packaging/chainsawWebStart.jnlp?rev=369178r1=369177r2=369178view=diff
==
--- logging/chainsaw/trunk/packaging/chainsawWebStart.jnlp (original)
+++ logging/chainsaw/trunk/packaging/chainsawWebStart.jnlp Sat Jan 14 20:59:46 
2006
@@ -2,16 +2,16 @@
 !-- JNLP File for Jakarta Log4j Chainsaw v2 Application -- 
 jnlp 
   spec=1.0+ 
-codebase=@CHAINSAW_CODEBASE@
-  href=@CHAINSAW_CODEBASE@@CHAINSAW_JNLP_FILE@ 
+codebase=http://logging.apache.org/log4j/docs/webstart/chainsaw/;
+  href=chainsawWebStart.jnlp 
   information 
 titleLog4j Chainsaw v2/title 
 vendorApache/vendor 
-homepage href=http://jakarta.apache.org/log4j/ 
+homepage href=http://logging.apache.org/log4j/ 
 descriptionA Log4j log viewing application/description

svn commit: r368982 - /logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogUI.java

2006-01-13 Thread psmith
Author: psmith
Date: Fri Jan 13 21:37:53 2006
New Revision: 368982

URL: http://svn.apache.org/viewcvs?rev=368982view=rev
Log:
Temporarily commenting out this plugin, only for a very short time.

Just focusing on some build things first, will release a new version of
Chainsaw soon, but without Zeroconf just to ensure the release is focused
on all the other changes first.

Modified:
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogUI.java

Modified: logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogUI.java
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogUI.java?rev=368982r1=368981r2=368982view=diff
==
--- logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogUI.java 
(original)
+++ logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogUI.java Fri 
Jan 13 21:37:53 2006
@@ -474,15 +474,15 @@
 //pluginRegistry.addPlugin(cc);
 //cc.activateOptions();
 
-try {
-Class pluginClass = 
Class.forName(org.apache.log4j.chainsaw.zeroconf.ZeroConfPlugin);
-Plugin plugin = (Plugin) pluginClass.newInstance();
-pluginRegistry.addPlugin(plugin);
-plugin.activateOptions();
-MessageCenter.getInstance().getLogger().info(Looks like ZeroConf 
stuff is available... WooHoo!);
-} catch (Throwable e) {
-MessageCenter.getInstance().getLogger().error(Doesn't look like 
ZeroConf is available, e);
-}
+//try {
+//Class pluginClass = 
Class.forName(org.apache.log4j.chainsaw.zeroconf.ZeroConfPlugin);
+//Plugin plugin = (Plugin) pluginClass.newInstance();
+//pluginRegistry.addPlugin(plugin);
+//plugin.activateOptions();
+//MessageCenter.getInstance().getLogger().info(Looks like ZeroConf 
stuff is available... WooHoo!);
+//} catch (Throwable e) {
+//MessageCenter.getInstance().getLogger().error(Doesn't look like 
ZeroConf is available, e);
+//}
   }
 
   private void setupReceiverPanel() {



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r368983 - in /logging/chainsaw/trunk: ./ anttasks-src/ anttasks-src/org/ anttasks-src/org/apache/ anttasks-src/org/apache/chainsaw/ anttasks-src/org/apache/chainsaw/ant/ packaging/

2006-01-13 Thread psmith
Author: psmith
Date: Fri Jan 13 21:40:22 2006
New Revision: 368983

URL: http://svn.apache.org/viewcvs?rev=368983view=rev
Log:
Modified Chainsaw 'webstart' build process so that it can 
automatically generate the .sh and .bat files required.

I was getting really tired of having to manually change these, so created
a custom Ant task to assist.  Placed the Ant task source code in it's
own source folder out of the way of the rest of the app, as it is only
needed during the build process.

Added:
logging/chainsaw/trunk/anttasks-src/
logging/chainsaw/trunk/anttasks-src/README.txt
logging/chainsaw/trunk/anttasks-src/org/
logging/chainsaw/trunk/anttasks-src/org/apache/
logging/chainsaw/trunk/anttasks-src/org/apache/chainsaw/
logging/chainsaw/trunk/anttasks-src/org/apache/chainsaw/ant/

logging/chainsaw/trunk/anttasks-src/org/apache/chainsaw/ant/CreateShellScripts.java
Removed:
logging/chainsaw/trunk/packaging/chainsaw.bat
logging/chainsaw/trunk/packaging/chainsaw.sh
Modified:
logging/chainsaw/trunk/build.xml

Added: logging/chainsaw/trunk/anttasks-src/README.txt
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/anttasks-src/README.txt?rev=368983view=auto
==
--- logging/chainsaw/trunk/anttasks-src/README.txt (added)
+++ logging/chainsaw/trunk/anttasks-src/README.txt Fri Jan 13 21:40:22 2006
@@ -0,0 +1,3 @@
+This source folder contains Ant taskdefs used
+by the Chainsaw build system.  They are not needed 
+for running Chainsaw, only for packaging it.
\ No newline at end of file

Added: 
logging/chainsaw/trunk/anttasks-src/org/apache/chainsaw/ant/CreateShellScripts.java
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/anttasks-src/org/apache/chainsaw/ant/CreateShellScripts.java?rev=368983view=auto
==
--- 
logging/chainsaw/trunk/anttasks-src/org/apache/chainsaw/ant/CreateShellScripts.java
 (added)
+++ 
logging/chainsaw/trunk/anttasks-src/org/apache/chainsaw/ant/CreateShellScripts.java
 Fri Jan 13 21:40:22 2006
@@ -0,0 +1,121 @@
+package org.apache.chainsaw.ant;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.Writer;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Vector;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.DirectoryScanner;
+import org.apache.tools.ant.Task;
+import org.apache.tools.ant.types.FileSet;
+
+/**
+ * This Ant task creates the necessary .bat and .sh files required to run 
Chainsaw
+ * on the commandline.  This task was created because it was getting VERY 
annoying
+ * to constantly maintain 2 script files as the Jar file names kept changing 
during
+ * the log4j 1.3 alpha stage, and as we (the Chainsaw developers) added 
dependencies
+ * as we added functionality.
+ * 
+ * This task takes and outputLocation as a , and a set of FileSets which form 
the
+ * basis of the classpath that is required to run Chainsaw.
+ * 
+ * @author psmith
+ *
+ */
+public class CreateShellScripts extends Task {
+
+
+private String outputLocation;
+
+private Vector fileSets = new Vector();
+
+public String getOutputLocation() {
+return outputLocation;
+}
+
+public void setOutputLocation(String outputLocation) {
+this.outputLocation = outputLocation;
+}
+
+public void execute() throws BuildException {
+super.execute();
+File outputLocationDir = new File(getOutputLocation());
+if(!outputLocationDir.exists()) {
+log(Creating director(ies) - + getOutputLocation());
+outputLocationDir.mkdirs();
+}
+Collection filenames = getFilenames();
+try {
+createUnixShellScript(outputLocationDir, filenames);
+createBatShellScript(outputLocationDir, filenames);
+} catch (Exception e) {
+throw new BuildException(Failed to create Scripts,e);
+}
+}
+
+public void addFileSet(FileSet fileSet) {
+fileSets.add(fileSet);
+}
+
+private void createBatShellScript(File outputLocationDir, Collection 
filenames) throws IOException {
+File unixScript = new File(outputLocationDir, chainsaw.bat);
+
+log(Creating Windows .bat script:  + unixScript.getAbsolutePath());
+
+Writer writer = new FileWriter(unixScript);
+writeExecutionLine(filenames, writer, ';');
+writer.close();
+}
+
+private void createUnixShellScript(File outputLocationDir, Collection 
fileNames) throws IOException {
+File unixScript = new File(outputLocationDir, chainsaw.sh);
+
+log(Creating Unix script:  + unixScript.getAbsolutePath());
+
+Writer writer = new FileWriter(unixScript);
+writer.write(#!/bin/sh\n

svn commit: r368984 - /logging/chainsaw/trunk/.cvsignore

2006-01-13 Thread psmith
Author: psmith
Date: Fri Jan 13 21:41:55 2006
New Revision: 368984

URL: http://svn.apache.org/viewcvs?rev=368984view=rev
Log:
Updated ignore files

Modified:
logging/chainsaw/trunk/.cvsignore

Modified: logging/chainsaw/trunk/.cvsignore
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/.cvsignore?rev=368984r1=368983r2=368984view=diff
==
--- logging/chainsaw/trunk/.cvsignore (original)
+++ logging/chainsaw/trunk/.cvsignore Fri Jan 13 21:41:55 2006
@@ -2,3 +2,5 @@
 lib
 build.properties
 build
+webstart-dist
+iSaw-dist



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r368986 - /logging/chainsaw/trunk/build.xml

2006-01-13 Thread psmith
Author: psmith
Date: Fri Jan 13 21:43:30 2006
New Revision: 368986

URL: http://svn.apache.org/viewcvs?rev=368986view=rev
Log:
Removed target that was used during testing, no longer needed.

Modified:
logging/chainsaw/trunk/build.xml

Modified: logging/chainsaw/trunk/build.xml
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/build.xml?rev=368986r1=368985r2=368986view=diff
==
--- logging/chainsaw/trunk/build.xml (original)
+++ logging/chainsaw/trunk/build.xml Fri Jan 13 21:43:30 2006
@@ -268,10 +268,6 @@
taskdef name=createshellscripts 
classpathref=compile.classpath 
classname=org.apache.chainsaw.ant.CreateShellScripts /
/target

-   target name=testshellscripts depends=shellscript-taskdef
-
-   /target
-   
   target name=webstart depends=shellscript-taskdef
 property name=webstart value=true/
 antcall target=chainsaw.jar/



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r365522 - in /logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf: ZeroConfPlugin.java ZeroConfPreferenceModel.java

2006-01-02 Thread psmith
Author: psmith
Date: Mon Jan  2 18:33:13 2006
New Revision: 365522

URL: http://svn.apache.org/viewcvs?rev=365522view=rev
Log:
Changes to support extended LoggerRepository interface.

Modified:

logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.java

logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPreferenceModel.java

Modified: 
logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.java
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.java?rev=365522r1=365521r2=365522view=diff
==
--- 
logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.java
 (original)
+++ 
logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.java
 Mon Jan  2 18:33:13 2006
@@ -5,6 +5,7 @@
 import java.awt.Container;
 import java.awt.Font;
 import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
 import java.awt.event.MouseAdapter;
 import java.awt.event.MouseEvent;
 import java.io.File;
@@ -20,6 +21,9 @@
 import javax.jmdns.ServiceListener;
 import javax.swing.AbstractAction;
 import javax.swing.BorderFactory;
+import javax.swing.Box;
+import javax.swing.BoxLayout;
+import javax.swing.DefaultListModel;
 import javax.swing.Icon;
 import javax.swing.ImageIcon;
 import javax.swing.JCheckBox;
@@ -56,6 +60,7 @@
 import org.apache.log4j.plugins.Plugin;
 import org.apache.log4j.plugins.PluginEvent;
 import org.apache.log4j.plugins.PluginListener;
+import org.apache.log4j.spi.LoggerRepositoryEx;
 
 import com.thoughtworks.xstream.XStream;
 import com.thoughtworks.xstream.io.xml.DomDriver;
@@ -154,7 +159,7 @@
 
 injectMenu();
 
-
LogManager.getLoggerRepository().getPluginRegistry().addPluginListener(new 
PluginListener() {
+
((LoggerRepositoryEx)LogManager.getLoggerRepository()).getPluginRegistry().addPluginListener(new
 PluginListener() {
 
 public void pluginStarted(PluginEvent e) {
 
@@ -395,6 +400,9 @@
 
 private JCheckBox autoConnect = new JCheckBox();
 
+private Box southBox = Box.createVerticalBox();
+private JCheckBox checkBox = new JCheckBox();
+
 private ServiceInfoListCellRenderer() {
 Font font = nameLabel.getFont();
 font = font.deriveFont(font.getSize() + 6);
@@ -405,13 +413,18 @@
 JPanel centerPanel = new JPanel(new BorderLayout(3, 3));
 
 centerPanel.add(nameLabel, BorderLayout.CENTER);
-centerPanel.add(detailLabel, BorderLayout.SOUTH);
+centerPanel.add(southBox, BorderLayout.SOUTH);
 panel.add(centerPanel, BorderLayout.CENTER);
 
+southBox.add(detailLabel);
+Box hBox = Box.createHorizontalBox();
+hBox.add(Box.createHorizontalGlue());
+hBox.add(new JLabel(Auto-connect:));
+hBox.add(checkBox);
+
+southBox.add(hBox);
 
-// TODO add autoconnect label
 panel.setBorder(BorderFactory.createEtchedBorder());
-
 }
 
 public Component getListCellRendererComponent(JList list, Object value,
@@ -427,6 +440,7 @@
 nameLabel.setText(info.getName());
 detailLabel.setText(info.getHostAddress() + : + info.getPort());
 iconLabel.setIcon(isConnectedTo(info)?ICON:null);
+
checkBox.setSelected(preferenceModel.getAutoConnectDevices().contains(info.getName()));
 return panel;
 }
 
@@ -440,15 +454,38 @@
 ListModel dlm = discoveredDevices;
 ServiceInfo info = (ServiceInfo) dlm.getElementAt(index);
 listBox.ensureIndexIsVisible(index);
-if(!isConnectedTo(info)) {
+if (!isConnectedTo(info)) {
 connectTo(info);
-}else {
+} else {
 disconnectFrom(info);
 }
 }
 }
 
+public void mousePressed(MouseEvent e) {
+/**
+ * This methodh handles when the user clicks the
+ * auto-connect
+ */
+int index = listBox.locationToIndex(e.getPoint());
 
+if (index != -1) {
+//Point p = SwingUtilities.convertPoint(e.getComponent(), 
e.getPoint(), )
+Component c = 
SwingUtilities.getDeepestComponentAt(ZeroConfPlugin.this, e.getX(), e.getY());
+if (c instanceof JCheckBox) {
+ServiceInfo info = (ServiceInfo) listBox.getModel()
+.getElementAt(index);
+String name = info.getName();
+if 
(preferenceModel.getAutoConnectDevices().contains(name

svn commit: r356982 - in /logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw: LogPanel.java LogPanelPreferenceModel.java

2005-12-14 Thread psmith
Author: psmith
Date: Wed Dec 14 22:17:52 2005
New Revision: 356982

URL: http://svn.apache.org/viewcvs?rev=356982view=rev
Log:
Fixed a rather annoying table bug whereby non-standard columns
kept getting added over an over and over again.

This approach means we need to treat the column List more like a Set
but guarantee the order of insertion is consistent.

When the ChainsawCyclicTableModel fires it's new KeyEvents we make sure
we're not doubling up there too.

Modified:
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogPanel.java

logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogPanelPreferenceModel.java

Modified: 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogPanel.java
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogPanel.java?rev=356982r1=356981r2=356982view=diff
==
--- logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogPanel.java 
(original)
+++ logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogPanel.java Wed 
Dec 14 22:17:52 2005
@@ -837,8 +837,13 @@
 tableModel.addNewKeyListener(
   new NewKeyListener() {
 public void newKeyAdded(NewKeyEvent e) {
+   // don't add the column if we already know about it, this could be 
if we've seen it before and saved the column preferences
+if(table.getColumn(e.getKey())!=null){
+return;
+}
   TableColumn col = new TableColumn(e.getNewModelIndex());
   col.setHeaderValue(e.getKey());
+  
   table.addColumn(col);
 }
   });
@@ -1481,12 +1486,12 @@
   }
 
 private void updatePreferenceModelColumnDetails() {
-preferenceModel.getColumns().clear();
+preferenceModel.clearColumns();
 for (int i = 0; i  table.getColumnModel().getColumnCount(); i++) {
 
 TableColumn c = table.getColumnModel().getColumn(i);
 
-preferenceModel.getColumns().add(c);
+preferenceModel.addColumn(c);
 }
 }
 

Modified: 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogPanelPreferenceModel.java
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogPanelPreferenceModel.java?rev=356982r1=356981r2=356982view=diff
==
--- 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogPanelPreferenceModel.java
 (original)
+++ 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogPanelPreferenceModel.java
 Wed Dec 14 22:17:52 2005
@@ -35,6 +35,8 @@
 import java.util.Properties;
 import java.util.Set;
 
+import javax.swing.table.TableColumn;
+
 
 /**
  *  Used to encapsulate all the preferences for a given LogPanel
@@ -74,8 +76,44 @@
   private List columns = new ArrayList();
   private Collection hiddenLoggers = new HashSet();
   
+  /**
+   * Returns an bunmodifiable/b list of the columns.
+   * 
+   * The reason it is unmodifiable is to enforce the requirement that
+   * the List is actually unique columns.  IT _could_ be a set,
+   * but we need to maintain the order of insertion.
+   * 
+   * @return
+   */
   public List getColumns() {
-  return columns;
+  return Collections.unmodifiableList(columns);
+  }
+  
+  public void clearColumns(){
+  columns.clear();
+  }
+  
+  public boolean addColumn(TableColumn column){
+  if(containsHeaderValue(column)){
+  return false;
+  }else{
+  return columns.add(column);
+  }
+  }
+  
+  /**
+   * Quite an inefficient search mechanism to make sure we don't allow 
duplicate Column headers
+   * @param column
+   * @return
+   */
+  private boolean containsHeaderValue(TableColumn column) {
+  for (Iterator iter = columns.iterator(); iter.hasNext();) {
+TableColumn c = (TableColumn) iter.next();
+if(c.getHeaderValue().equals(column.getHeaderValue())){
+return true;
+}
+  }
+  return false;
   }
 
   public void setColumns(List columns) {
@@ -151,7 +189,8 @@
 setDetailPaneVisible(model.isDetailPaneVisible());
 setLogTreePanelVisible(model.isLogTreePanelVisible());
 
-setColumns(model.getColumns());
+// we have to copy the list, because getColumns() is unmodifiable
+setColumns(new ArrayList(model.getColumns()));
 setHiddenLoggers(model.getHiddenLoggers());
 
 /**



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r351860 - /logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/layout/EventDetailLayout.java

2005-12-02 Thread psmith
Author: psmith
Date: Fri Dec  2 16:41:09 2005
New Revision: 351860

URL: http://svn.apache.org/viewcvs?rev=351860view=rev
Log:
Bug 37756 A thread-safety issue with the layout being used.

Rather than add a sync block to the layout class itself, I have
placed a sync block here instead, which I believe is more appropriate.

Thanks to Eric H. for notifying us of the problem.

Modified:

logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/layout/EventDetailLayout.java

Modified: 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/layout/EventDetailLayout.java
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/layout/EventDetailLayout.java?rev=351860r1=351859r2=351860view=diff
==
--- 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/layout/EventDetailLayout.java
 (original)
+++ 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/layout/EventDetailLayout.java
 Fri Dec  2 16:41:09 2005
@@ -270,6 +270,15 @@
*/
   public void format(Writer output, LoggingEvent event)
 throws IOException {
-patternLayout.format(output, copyForHTML(event));
+  LoggingEvent newEvent =  copyForHTML(event);
+  /**
+   * Layouts are not thread-safe, but are normally
+   * protected by the fact that their Appender is thread-safe.
+   * 
+   * But here in Chainsaw there is no such guarantees.
+   */ 
+  synchronized(patternLayout) {
+  patternLayout.format(output,newEvent);
+  }
   }
 }



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r350218 - /logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogPanel.java

2005-12-01 Thread psmith
Author: psmith
Date: Thu Dec  1 01:29:01 2005
New Revision: 350218

URL: http://svn.apache.org/viewcvs?rev=350218view=rev
Log:
Now any column's location or width, even if it's not part of the standard 
Chainsaw columns
will be saved in the preferences.

I have to say I didn't think it would be that easy, but happy to be wrong.

Also updated so that the LogPanel's saved config file has a .xml extension. 

Modified:
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogPanel.java

Modified: 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogPanel.java
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogPanel.java?rev=350218r1=350217r2=350218view=diff
==
--- logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogPanel.java 
(original)
+++ logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogPanel.java Thu 
Dec  1 01:29:01 2005
@@ -1415,7 +1415,7 @@
   public void loadSettings(LoadSettingsEvent event) {
 
 File xmlFile = new File(SettingsManager.getInstance()
-.getSettingsDirectory(), URLEncoder.encode(identifier));
+.getSettingsDirectory(), URLEncoder.encode(identifier) + 
.xml);
 
 if (xmlFile.exists()) {
 XStream stream = buildXStreamForLogPanelPreference();
@@ -1462,7 +1462,7 @@
*/
   public void saveSettings(SaveSettingsEvent event) {
   File xmlFile = new File(SettingsManager.getInstance()
-  .getSettingsDirectory(), URLEncoder.encode(identifier));
+  .getSettingsDirectory(), URLEncoder.encode(identifier) + .xml);
 
 //  TODO  TableColumnData is no longer required, delete it
 updatePreferenceModelColumnDetails();
@@ -1486,12 +1486,7 @@
 
 TableColumn c = (TableColumn) table.getColumnModel().getColumn(i);
 
-if (c.getModelIndex()  ChainsawColumns.getColumnsNames().size()) {
-preferenceModel.getColumns().add(c);
-} else {
-logger.debug(Not saving col '  + c.getHeaderValue()
-+ ' not part of standard columns);
-}
+preferenceModel.getColumns().add(c);
 }
 }
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r350224 - in /logging/chainsaw/trunk: tests/org/apache/log4j/net/ zeroconf/org/apache/log4j/chainsaw/zeroconf/ zeroconf/org/apache/log4j/net/

2005-12-01 Thread psmith
Author: psmith
Date: Thu Dec  1 02:40:10 2005
New Revision: 350224

URL: http://svn.apache.org/viewcvs?rev=350224view=rev
Log:
ZeroConfPlugin now getting some basic model details, and can save/restore it's 
preferences
via XStream.

Tweaked the HTML help file.

When a device that has been registered as an auto-connect candidate appears
then a thread is started to auto-connect it.

Double-clicking the GUI item in the plugin connects/disconnects the Receiver,
this also prevents multiple receivers from being created for the same device.

Removed the property ZeroConfDeviceName because an Appender already has a 
Name property.

Added:

logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPreferenceModel.java
Modified:

logging/chainsaw/trunk/tests/org/apache/log4j/net/ZeroConfSocketHubAppenderTest.java

logging/chainsaw/trunk/tests/org/apache/log4j/net/ZeroConfSocketHubAppenderTestBed.java

logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.html

logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.java

logging/chainsaw/trunk/zeroconf/org/apache/log4j/net/ZeroConfSocketHubAppender.java

Modified: 
logging/chainsaw/trunk/tests/org/apache/log4j/net/ZeroConfSocketHubAppenderTest.java
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/tests/org/apache/log4j/net/ZeroConfSocketHubAppenderTest.java?rev=350224r1=350223r2=350224view=diff
==
--- 
logging/chainsaw/trunk/tests/org/apache/log4j/net/ZeroConfSocketHubAppenderTest.java
 (original)
+++ 
logging/chainsaw/trunk/tests/org/apache/log4j/net/ZeroConfSocketHubAppenderTest.java
 Thu Dec  1 02:40:10 2005
@@ -52,7 +52,7 @@
 
 }});
 ZeroConfSocketHubAppender appender = new ZeroConfSocketHubAppender();
-appender.setZeroConfDeviceName(SimpleTest);
+appender.setName(SimpleTest);
 appender.activateOptions();
 
 Thread.sleep(DEFAULT_TIMEOUT_FOR_ZEROCONF_EVENTS_TO_APPEAR);

Modified: 
logging/chainsaw/trunk/tests/org/apache/log4j/net/ZeroConfSocketHubAppenderTestBed.java
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/tests/org/apache/log4j/net/ZeroConfSocketHubAppenderTestBed.java?rev=350224r1=350223r2=350224view=diff
==
--- 
logging/chainsaw/trunk/tests/org/apache/log4j/net/ZeroConfSocketHubAppenderTestBed.java
 (original)
+++ 
logging/chainsaw/trunk/tests/org/apache/log4j/net/ZeroConfSocketHubAppenderTestBed.java
 Thu Dec  1 02:40:10 2005
@@ -15,6 +15,7 @@
 
 public static void main(String[] args) throws Exception {
 ZeroConfSocketHubAppender appender = new ZeroConfSocketHubAppender();
+appender.setName(foo);
 appender.activateOptions();
 Logger LOG = LogManager.getRootLogger();
 LOG.addAppender(appender);

Modified: 
logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.html
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.html?rev=350224r1=350223r2=350224view=diff
==
--- 
logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.html
 (original)
+++ 
logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.html
 Thu Dec  1 02:40:10 2005
@@ -5,7 +5,7 @@
 /HEAD
 
 BODY BGCOLOR=#FF TEXT=#00 LINK=#FF VLINK=#80 
ALINK=#FF00FF BACKGROUND=?
-h1ZeroConf (Zero Configuration)/h1
+h2ZeroConf (Zero Configuration)/h2
 pOne of the hardest parts of any network-based application is configuring 
which bits connect to what, and how 
 do they connect to each other.  Each device that can be connected 
emphasisto/emphasis already knows
 the configuration details required to connect to it, but every other device 
that may wish to connect to it
@@ -22,23 +22,29 @@
 JmDNS to broadcast Appender information so that a matching Receiver can be 
easily created to connect to each other
 to stream logging messages into Chainsaw.  
 /p
-h1Interesting... So what do I need to use ZeroConf with Chainsaw  
log4j?/h1
 p
-TODO
+ul
+lia href=http://www.zeroconf.org; 
target=_newhttp://www.zeroconf.org/a/li
+lia href=http://jmdns.sf.net; target=_newhttp://jmdns.sf.net/a/li
+/ul
 /p
-h1/h1
-h1Cool... But I have some applications that use log4j 1.2.x.  Will it still 
work?/h1
-pYes.  We have designed a backward compatible mechanism to expose log4j 
1.2.x SocketHubAppender so that Chainsaw can detect it automatically.  
-You just need to download the codelog4j-zeroconf.jar/code and the JmDNS 
package.  Then change your references from codeSocketHubAppender/code
+h2Interesting... So what do I need to use ZeroConf with Chainsaw  
log4j?/h2
+p
+The log4j team has created an additional JAR

svn commit: r351606 - /logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.java

2005-12-01 Thread psmith
Author: psmith
Date: Thu Dec  1 21:58:49 2005
New Revision: 351606

URL: http://svn.apache.org/viewcvs?rev=351606view=rev
Log:
Added an icon to the ZeroConf plugin's tab when it detects a discovered device.

Modified:

logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.java

Modified: 
logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.java
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.java?rev=351606r1=351605r2=351606view=diff
==
--- 
logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.java
 (original)
+++ 
logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.java
 Thu Dec  1 21:58:49 2005
@@ -23,6 +23,7 @@
 import javax.swing.AbstractAction;
 import javax.swing.BorderFactory;
 import javax.swing.DefaultListModel;
+import javax.swing.Icon;
 import javax.swing.ImageIcon;
 import javax.swing.JCheckBox;
 import javax.swing.JFrame;
@@ -35,6 +36,7 @@
 import javax.swing.JPopupMenu;
 import javax.swing.JScrollBar;
 import javax.swing.JScrollPane;
+import javax.swing.JTabbedPane;
 import javax.swing.JToolBar;
 import javax.swing.ListCellRenderer;
 import javax.swing.ListModel;
@@ -86,6 +88,8 @@
 
 private static final Logger LOG = Logger.getLogger(ZeroConfPlugin.class);
 
+private static final Icon DEVICE_DISCOVERED_ICON = new 
ImageIcon(ChainsawIcons.ANIM_RADIO_TOWER);
+
 private ModifiableListModel discoveredDevices = new ModifiableListModel();
 
 private final JList listBox = new JList(discoveredDevices);
@@ -193,6 +197,35 @@
 }
 }else {
 this.preferenceModel = new ZeroConfPreferenceModel();
+}
+
+discoveredDevices.addListDataListener(new ListDataListener() {
+
+public void intervalAdded(ListDataEvent e) {
+setIconIfNeeded();
+}
+
+public void intervalRemoved(ListDataEvent e) {
+setIconIfNeeded();
+}
+
+public void contentsChanged(ListDataEvent e) {
+setIconIfNeeded();
+}});
+}
+
+/**
+ * Sets the icon of this parent container (a JTabbedPane, we hope
+ *
+ */
+private void setIconIfNeeded() {
+Container container = this.getParent();
+if(container instanceof JTabbedPane) {
+JTabbedPane tabbedPane = (JTabbedPane) container;
+Icon icon = 
discoveredDevices.getSize()==0?null:DEVICE_DISCOVERED_ICON;
+tabbedPane.setIconAt(tabbedPane.indexOfTab(getName()), icon);
+}else {
+LOG.warn(Parent is not a TabbedPane, not setting icon:  + 
container.getClass().getName());
 }
 }
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r350052 - /logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.java

2005-11-30 Thread psmith
Author: psmith
Date: Wed Nov 30 13:24:09 2005
New Revision: 350052

URL: http://svn.apache.org/viewcvs?rev=350052view=rev
Log:
Fixed an exception on exit of Chainsaw.  Since there are other plugins
that will be stopped that have nothing to do with ZeroConf stuff, this
check just ignores them if there is no matching menu item.

Modified:

logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.java

Modified: 
logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.java
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.java?rev=350052r1=350051r2=350052view=diff
==
--- 
logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.java
 (original)
+++ 
logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.java
 Wed Nov 30 13:24:09 2005
@@ -152,8 +152,10 @@
 }
 // need to make sure that the menu item tracking this item has 
it's icon and enabled state updade
 JMenuItem item = locateMatchingMenuItem(plugin.getName());
-item.setEnabled(true);
-item.setIcon(null);
+if (item!=null) {
+item.setEnabled(true);
+item.setIcon(null);
+}
 discoveredDevices.fireContentsChanged();
 }});
 
@@ -396,12 +398,20 @@
 
 // this instance of the menu item needs to be disabled, and have an 
icon added
 JMenuItem item = locateMatchingMenuItem(info.getName());
-item.setIcon(new ImageIcon(ChainsawIcons.ANIM_NET_CONNECT));
-item.setEnabled(false);
+if (item!=null) {
+item.setIcon(new ImageIcon(ChainsawIcons.ANIM_NET_CONNECT));
+item.setEnabled(false);
+}
 // now notify the list model has changed, it needs redrawing of the 
receiver icon now it's connected
 discoveredDevices.fireContentsChanged();
 }
 
+/**
+ * Finds the matching JMenuItem based on name, may return null if there is 
no match.
+ * 
+ * @param name
+ * @return
+ */
 private JMenuItem locateMatchingMenuItem(String name) {
 Component[] menuComponents = connectToMenu.getMenuComponents();
 for (int i = 0; i  menuComponents.length; i++) {
@@ -413,7 +423,7 @@
 }
 }
 }
-throw new IllegalArgumentException(could not locate Menu Item 
matching name  + name);
+return null;
 }
 
 public static void main(String[] args) throws InterruptedException {



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r350053 - in /logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw: ApplicationPreferenceModel.java ApplicationPreferenceModelPanel.java ApplicationPreferenceModelSaver.java LogUI.jav

2005-11-30 Thread psmith
Author: psmith
Date: Wed Nov 30 13:27:31 2005
New Revision: 350053

URL: http://svn.apache.org/viewcvs?rev=350053view=rev
Log:
Refactored out the saving of the ApplicationPreferenceModel to a separate class,
using XStream.

This required a little bit of tweaking across LogUI and the 
ApplicationPreferenceModelPanel.

The default.properties file has now had all default values for 
ApplicationPreferenceModel
removed, and the individual properties explicitly set on the fields themselves.

This means that the dialog needs to have it's GUI components initialized with 
the 
initial values, because it's likely that a property change event won't fire
if the loaded Preference values are no different than the default.

Added:

logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ApplicationPreferenceModelSaver.java
Modified:

logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ApplicationPreferenceModel.java

logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ApplicationPreferenceModelPanel.java
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogUI.java

Modified: 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ApplicationPreferenceModel.java
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ApplicationPreferenceModel.java?rev=350053r1=350052r2=350053view=diff
==
--- 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ApplicationPreferenceModel.java
 (original)
+++ 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ApplicationPreferenceModel.java
 Wed Nov 30 13:27:31 2005
@@ -30,31 +30,37 @@
  * @author Paul Smith [EMAIL PROTECTED]
  *
  */
-public class ApplicationPreferenceModel implements SettingsListener {
+public class ApplicationPreferenceModel {
 
-private boolean showNoReceiverWarning  ;
-private boolean statusBar;
-private boolean toolbar;
-private boolean receivers;
-private boolean confirmExit;
-private boolean showSplash;
-private String lookAndFeelClassName;
-private int toolTipDisplayMillis;
-private int cyclicBufferSize;
-private String lastUsedVersion;
-private int responsiveness;
+private boolean showNoReceiverWarning = true ;
+private boolean statusBar = true;
+private boolean toolbar = true;
+private boolean receivers = true;
+private boolean confirmExit = true;
+private boolean showSplash = true;
+private String lookAndFeelClassName = ;
+private int toolTipDisplayMillis = 4000;
+private int cyclicBufferSize = 5000;
+private String lastUsedVersion = ;
+private int responsiveness = 3;
 
 private String identifierExpression = Constants.HOSTNAME_KEY +  -  + 
Constants.APPLICATION_KEY; 
 
 private transient final PropertyChangeSupport propertySupport =
 new PropertyChangeSupport(this);
-private int tabPlacement;
+
+private int tabPlacement = 3;
 
 /**
  * If not 'empty', this property will be used as the URL to load log4j 
configuration at startup
  */
 private String configurationURL=;
-   private boolean okToRemoveSecurityManager;
+ 
+/**
+ *this means for Receivers that require optional jars that can't be 
delivered
+ *by the Web start classloader, we need to be able to remove the 
SecurityManager in place
+ */
+private boolean okToRemoveSecurityManager = false;
 
 /**
  * @param listener
@@ -164,47 +170,6 @@
 firePropertyChange(showNoReceiverWarning, oldShowNoReceiverWarning, 
newShowNoReceiverWarning);
 }
 
-/* (non-Javadoc)
- * @see 
org.apache.log4j.chainsaw.prefs.SettingsListener#loadSettings(org.apache.log4j.chainsaw.prefs.LoadSettingsEvent)
- */
-public void loadSettings(LoadSettingsEvent event) {
-   setShowNoReceiverWarning(event.asBoolean(showNoReceiverWarning));
-   setIdentifierExpression(event.getSetting(identifierExpression));
-   setResponsiveness(event.asInt(Responsiveness));
-   setTabPlacement(event.asInt(tabPlacement));
-   setStatusBar(event.asBoolean(statusBar));
-   setToolbar(event.asBoolean(toolbar));
-   setReceivers(event.asBoolean(receivers));
-   setLookAndFeelClassName(event.getSetting(lookAndFeelClassName));
-   setConfirmExit(event.asBoolean(confirmExit));
-   setShowSplash(event.asBoolean(showSplash));
-   setToolTipDisplayMillis(event.asInt(toolTipDisplayMillis));
-   setCyclicBufferSize(event.asInt(cyclicBufferSize));
-   setConfigurationURL(event.getSetting(configurationURL));
-   setLastUsedVersion(event.getSetting(lastUsedVersion));
-   
setOkToRemoveSecurityManager(event.asBoolean(okToRemoveSecurityManager));
-}
-
-/* (non-Javadoc)
- * @see 
org.apache.log4j.chainsaw.prefs.SettingsListener#saveSettings(org.apache.log4j.chainsaw.prefs.SaveSettingsEvent)
- */
-public void saveSettings

svn commit: r350054 - /logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/prefs/default.properties

2005-11-30 Thread psmith
Author: psmith
Date: Wed Nov 30 13:28:13 2005
New Revision: 350054

URL: http://svn.apache.org/viewcvs?rev=350054view=rev
Log:
Refactored out the saving of the ApplicationPreferenceModel to a separate class,
using XStream.

This required a little bit of tweaking across LogUI and the 
ApplicationPreferenceModelPanel.

The default.properties file has now had all default values for 
ApplicationPreferenceModel
removed, and the individual properties explicitly set on the fields themselves.

This means that the dialog needs to have it's GUI components initialized with 
the 
initial values, because it's likely that a property change event won't fire
if the loaded Preference values are no different than the default.

Modified:

logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/prefs/default.properties

Modified: 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/prefs/default.properties
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/prefs/default.properties?rev=350054r1=350053r2=350054view=diff
==
--- 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/prefs/default.properties
 (original)
+++ 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/prefs/default.properties
 Wed Nov 30 13:28:13 2005
@@ -8,30 +8,15 @@
 main.window.y=50
 main.window.width=640
 main.window.height=480
-tabPlacement=3
-Responsiveness=3
 
 
table.columns.order=ID,Timestamp,Level,Logger,Message,Throwable,Thread,NDC,Class,Method,File,Line
 table.columns.widths=50,150,50,100,300,100,150,150,300,150,100,100
 
-statusBar=true
-receivers=true
-toolbar=true
 SavedConfigs.Size=0
 DateFormat.1=HH:mm:ss
 DateFormat.2=HH:mm
-showNoReceiverWarning=true
-showSplash=true
 identifierExpression=PROP.hostname - PROP.application
-lookAndFeelClassName=
-confirmExit=true
-toolTipDisplayMillis=4000
-configurationURL=
-lastUsedVersion=
-cyclicBufferSize=5000
-# this means for Receivers that require optional jars that can't be delivered
-# by the Web start classloader, we need to be able to remove the 
SecurityManager in place
-okToRemoveSecurityManager=false
+
 
 # These are the default LogPanel settings
 dateFormatPattern=ISO8601



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r350055 - /logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ApplicationPreferenceModelPanel.java

2005-11-30 Thread psmith
Author: psmith
Date: Wed Nov 30 13:29:29 2005
New Revision: 350055

URL: http://svn.apache.org/viewcvs?rev=350055view=rev
Log:
Removed commented out method.

Modified:

logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ApplicationPreferenceModelPanel.java

Modified: 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ApplicationPreferenceModelPanel.java
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ApplicationPreferenceModelPanel.java?rev=350055r1=350054r2=350055view=diff
==
--- 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ApplicationPreferenceModelPanel.java
 (original)
+++ 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ApplicationPreferenceModelPanel.java
 Wed Nov 30 13:29:29 2005
@@ -105,16 +105,6 @@
   });
   }
 
-//  /**
-//   * This method sets the uncommitedPreferenceModel to have values that
-//   * are 'abnormal', such that the very first call to updateModel()
-//   * ensures that the GUI components get notified of change, and set
-//   * themselves appropriately
-//   *
-//   */
-//  private void configureUncommittedPreferenceModel() {
-  uncommittedPreferenceModel.setOkToRemoveSecurityManager()
-//  }
 
 public static void main(String[] args) {
 JFrame f = new JFrame(App Preferences Panel Test Bed);



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r350110 - in /logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw: ApplicationPreferenceModel.java ApplicationPreferenceModelSaver.java LogUI.java

2005-11-30 Thread psmith
Author: psmith
Date: Wed Nov 30 18:43:03 2005
New Revision: 350110

URL: http://svn.apache.org/viewcvs?rev=350110view=rev
Log:
Fixed up some bugs.  The previous preference model changes meant
that, err, no logs ended up being displayed, because the 
worker thread never got a valid expression to filter into tabs.

Hmmm. silly me.

Modified:

logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ApplicationPreferenceModel.java

logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ApplicationPreferenceModelSaver.java
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogUI.java

Modified: 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ApplicationPreferenceModel.java
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ApplicationPreferenceModel.java?rev=350110r1=350109r2=350110view=diff
==
--- 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ApplicationPreferenceModel.java
 (original)
+++ 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ApplicationPreferenceModel.java
 Wed Nov 30 18:43:03 2005
@@ -44,7 +44,7 @@
 private String lastUsedVersion = ;
 private int responsiveness = 3;
 
-private String identifierExpression = Constants.HOSTNAME_KEY +  -  + 
Constants.APPLICATION_KEY; 
+private String identifierExpression = PROP.hostname - PROP.application; 
 
 private transient final PropertyChangeSupport propertySupport =
 new PropertyChangeSupport(this);

Modified: 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ApplicationPreferenceModelSaver.java
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ApplicationPreferenceModelSaver.java?rev=350110r1=350109r2=350110view=diff
==
--- 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ApplicationPreferenceModelSaver.java
 (original)
+++ 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ApplicationPreferenceModelSaver.java
 Wed Nov 30 18:43:03 2005
@@ -40,10 +40,13 @@
 XStream stream = new XStream(new DomDriver());
 try {
 File file = 
getApplicationPreferenceXMLFile(SettingsManager.getInstance().getSettingsDirectory());
-FileReader reader = new FileReader(file);
-ApplicationPreferenceModel loadedModel = 
(ApplicationPreferenceModel) stream.fromXML(reader);
-model.apply(loadedModel);
-reader.close();
+if (file.exists()) {
+FileReader reader = new FileReader(file);
+ApplicationPreferenceModel loadedModel = 
(ApplicationPreferenceModel) stream
+.fromXML(reader);
+model.apply(loadedModel);
+reader.close();
+}
 } catch (Exception e) {
 //TODO exception handling
 e.printStackTrace();

Modified: logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogUI.java
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogUI.java?rev=350110r1=350109r2=350110view=diff
==
--- logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogUI.java 
(original)
+++ logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogUI.java Wed 
Nov 30 18:43:03 2005
@@ -1148,6 +1148,8 @@
   handler.setIdentifierExpression(evt.getNewValue().toString());
 }
   });
+
handler.setIdentifierExpression(applicationPreferenceModel.getIdentifierExpression());
+
 
 applicationPreferenceModel.addPropertyChangeListener(
   toolTipDisplayMillis,
@@ -1168,6 +1170,7 @@
   handler.setQueueInterval((value * 1000) - 750);
 }
   });
+handler.setQueueInterval((applicationPreferenceModel.getResponsiveness() * 
1000) - 750);
 
 applicationPreferenceModel.addPropertyChangeListener(
   tabPlacement,
@@ -1201,7 +1204,8 @@
   setStatusBarVisible(value);
 }
   });
-
+setStatusBarVisible(applicationPreferenceModel.isStatusBar());
+
 applicationPreferenceModel.addPropertyChangeListener(
   receivers,
   new PropertyChangeListener() {
@@ -1215,7 +1219,13 @@
   }
 }
   });
+//if (applicationPreferenceModel.isReceivers()) {
+//  showReceiverPanel();
+//} else {
+//  hideReceiverPanel();
+//}
 
+
 applicationPreferenceModel.addPropertyChangeListener(
   toolbar,
   new PropertyChangeListener() {
@@ -1226,7 +1236,6 @@
   });
 toolbar.setVisible(applicationPreferenceModel.isToolbar());
 
-setStatusBarVisible(applicationPreferenceModel.isStatusBar());
   }
 
   /**



-
To unsubscribe, e-mail: [EMAIL PROTECTED

svn commit: r349199 - /logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogUI.java

2005-11-27 Thread psmith
Author: psmith
Date: Sun Nov 27 02:21:39 2005
New Revision: 349199

URL: http://svn.apache.org/viewcvs?rev=349199view=rev
Log:
Re-ordered the way the plugins are started.  This means that by the time
the plugins' .activateOptions() method is called, the component
has been added to the component tree such that it can detect what
JFrame it belongs to (handy for allowing the plugin
to inject menu's into the main JFrame menu.

Modified:
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogUI.java

Modified: logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogUI.java
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogUI.java?rev=349199r1=349198r2=349199view=diff
==
--- logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogUI.java 
(original)
+++ logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogUI.java Sun 
Nov 27 02:21:39 2005
@@ -474,12 +474,21 @@
 try {
   Class vfsPluginClass = 
Class.forName(org.apache.log4j.chainsaw.vfs.VFSPlugin);
   Plugin vfsPlugin = (Plugin) vfsPluginClass.newInstance();
-  vfsPlugin.activateOptions();
   pluginRegistry.addPlugin(vfsPlugin);
+  vfsPlugin.activateOptions();
   MessageCenter.getInstance().getLogger().info(Looks like VFS is 
available... WooHoo!);
 } catch (Throwable e) {
   MessageCenter.getInstance().getLogger().error(Doesn't look like VFS is 
available, e);
 }
+try {
+Class pluginClass = 
Class.forName(org.apache.log4j.chainsaw.zeroconf.ZeroConfPlugin);
+Plugin plugin = (Plugin) pluginClass.newInstance();
+pluginRegistry.addPlugin(plugin);
+plugin.activateOptions();
+MessageCenter.getInstance().getLogger().info(Looks like ZeroConf 
stuff is available... WooHoo!);
+} catch (Throwable e) {
+MessageCenter.getInstance().getLogger().error(Doesn't look like 
ZeroConf is available, e);
+}
   }
 
   private void setupReceiverPanel() {
@@ -712,7 +721,6 @@
 
 panePanel.add(getTabbedPane());
 addWelcomePanel();
-initPlugins(pluginRegistry);
 
 getContentPane().add(toolbar, BorderLayout.NORTH);
 getContentPane().add(statusBar, BorderLayout.SOUTH);
@@ -722,6 +730,13 @@
 mainReceiverSplitPane.setDividerLocation(-1);
 
 getContentPane().add(mainReceiverSplitPane, BorderLayout.CENTER);
+
+/**
+ * We need to make sure that all the internal GUI components have been 
added to the
+ * JFrame so that any plugns that get activated during initPlugins(...) 
method
+ * have access to inject menus  
+ */
+initPlugins(pluginRegistry);
 
 mainReceiverSplitPane.setResizeWeight(1.0);
 addWindowListener(



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r349200 - in /logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf: ZeroConfPlugin.html ZeroConfPlugin.java

2005-11-27 Thread psmith
Author: psmith
Date: Sun Nov 27 02:24:00 2005
New Revision: 349200

URL: http://svn.apache.org/viewcvs?rev=349200view=rev
Log:
Zeroconf very close to being complete.  Injected Connect to
menu into the main Chainsaw menu structure.

Added basic help text describing the details of ZeroConf.


Added:

logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.html
Modified:

logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.java

Added: 
logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.html
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.html?rev=349200view=auto
==
--- 
logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.html
 (added)
+++ 
logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.html
 Sun Nov 27 02:24:00 2005
@@ -0,0 +1,46 @@
+!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 3.2 Final//EN
+HTML
+HEAD
+link rel=stylesheet href=stylesheet.css type=text/css
+/HEAD
+
+BODY BGCOLOR=#FF TEXT=#00 LINK=#FF VLINK=#80 
ALINK=#FF00FF BACKGROUND=?
+h1ZeroConf (Zero Configuration)/h1
+pOne of the hardest parts of any network-based application is configuring 
which bits connect to what, and how 
+do they connect to each other.  Each device that can be connected 
emphasisto/emphasis already knows
+the configuration details required to connect to it, but every other device 
that may wish to connect to it
+will need to be provided with this information so the connection can be 
established.
+/p
+p
+ZeroConf aims to eliminate the time-consuming aspect of connecting devices 
together. The device broadcasts the 
+configuration details reqired to connect or work with the service over a 
multicast protocol. You probably already have
+devices on your local network such as printers that are automatically 
discovered by your computer.
+/p
+p
+Zeroconf is an open-standard that many vendors are using to reduce cost of 
configuration.  The bJmDNS/b project
+is an Apache 2.0 licensed library that implements the ZeroConf protocol.  
Chainsaw and log4j use
+JmDNS to broadcast Appender information so that a matching Receiver can be 
easily created to connect to each other
+to stream logging messages into Chainsaw.  
+/p
+h1Interesting... So what do I need to use ZeroConf with Chainsaw  
log4j?/h1
+p
+TODO
+/p
+h1/h1
+h1Cool... But I have some applications that use log4j 1.2.x.  Will it still 
work?/h1
+pYes.  We have designed a backward compatible mechanism to expose log4j 
1.2.x SocketHubAppender so that Chainsaw can detect it automatically.  
+You just need to download the codelog4j-zeroconf.jar/code and the JmDNS 
package.  Then change your references from codeSocketHubAppender/code
+to codeZeroConfSocketHubAppender/code. (We recommend you change the 'name' 
propety from it's default to make it easy for you to use, other
+wise it's name will appear as the default 'SocketHubAppender'./p
+
+h1But... Surely there's a catch?/h1
+pA little.  Because it's based on a multicast protocol, routers tend to 
block these packets, and so it's likely that your production computers,
+which are usually in a heavily protected network won't be able to broadcast 
their configuration information.  If you have a VPN
+into this sort of network it is possible that these multicast packets can 
traverse the network./p
+
+h1Oh... So is this even useful?/h1
+pIt's extremely useful for development, QA and staging environments.  
Usually the QA/Staging environment is isolated from your development
+team, but having them monitor logs from these machines would be handy.  Or 
your QA team may want to copy/paste some ERROR messages from
+QA/staging to notify the dev team.  ZeroConf gives your whole software 
development team an easy way to get access to your logging events./p
+/BODY
+/HTML

Modified: 
logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.java
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.java?rev=349200r1=349199r2=349200view=diff
==
--- 
logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.java
 (original)
+++ 
logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.java
 Sun Nov 27 02:24:00 2005
@@ -2,9 +2,12 @@
 
 import java.awt.BorderLayout;
 import java.awt.Component;
+import java.awt.Container;
 import java.awt.Font;
+import java.awt.event.ActionEvent;
 import java.awt.event.MouseAdapter;
 import java.awt.event.MouseEvent;
+import java.util.Arrays;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
@@ -14,6 +17,7 @@
 import javax.jmdns.ServiceEvent;
 import javax.jmdns.ServiceInfo

svn commit: r348905 - /logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.java

2005-11-24 Thread psmith
Author: psmith
Date: Thu Nov 24 23:05:24 2005
New Revision: 348905

URL: http://svn.apache.org/viewcvs?rev=348905view=rev
Log:
Plugin can now display when device appears/disappears, and the user can
double-click to automatically create a Receiver.


Modified:

logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.java

Modified: 
logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.java
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.java?rev=348905r1=348904r2=348905view=diff
==
--- 
logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.java
 (original)
+++ 
logging/chainsaw/trunk/zeroconf/org/apache/log4j/chainsaw/zeroconf/ZeroConfPlugin.java
 Thu Nov 24 23:05:24 2005
@@ -5,6 +5,10 @@
 import java.awt.Font;
 import java.awt.event.MouseAdapter;
 import java.awt.event.MouseEvent;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Map.Entry;
 
 import javax.jmdns.JmDNS;
 import javax.jmdns.ServiceEvent;
@@ -24,12 +28,19 @@
 import javax.swing.ListModel;
 
 import org.apache.log4j.BasicConfigurator;
+import org.apache.log4j.LogManager;
 import org.apache.log4j.Logger;
+import org.apache.log4j.chainsaw.ModifiableListModel;
 import org.apache.log4j.chainsaw.icons.ChainsawIcons;
 import org.apache.log4j.chainsaw.plugins.GUIPluginSkeleton;
+import org.apache.log4j.net.SocketHubReceiver;
 import org.apache.log4j.net.ZeroConfSocketHubAppender;
 import org.apache.log4j.net.ZeroConfSocketHubAppenderTestBed;
 import org.apache.log4j.net.Zeroconf4log4j;
+import org.apache.log4j.plugins.Plugin;
+import org.apache.log4j.plugins.PluginEvent;
+import org.apache.log4j.plugins.PluginListener;
+import org.apache.log4j.plugins.PluginRegistry;
 import org.apache.log4j.xml.Log4jEntityResolver;
 
 /**
@@ -51,7 +62,7 @@
 
 private static final Logger LOG = Logger.getLogger(ZeroConfPlugin.class);
 
-private DefaultListModel discoveredDevices = new DefaultListModel();
+private ModifiableListModel discoveredDevices = new ModifiableListModel();
 
 private final JList listBox = new JList(discoveredDevices);
 
@@ -59,6 +70,9 @@
 
 private JmDNS jmDNS;
 
+
+private Map serviceInfoToReceiveMap = new HashMap();
+
 public ZeroConfPlugin() {
 setName(Zeroconf);
 }
@@ -77,9 +91,30 @@
 
 listBox.setCellRenderer(new ServiceInfoListCellRenderer());
 listBox.setLayoutOrientation(JList.HORIZONTAL_WRAP);
+listBox.setFixedCellHeight(75);
+listBox.setFixedCellWidth(200);
 listBox.setVisibleRowCount(-1);
 listBox.addMouseListener(new ConnectorMouseListener());
 add(scrollPane, BorderLayout.CENTER);
+
+
LogManager.getLoggerRepository().getPluginRegistry().addPluginListener(new 
PluginListener() {
+
+public void pluginStarted(PluginEvent e) {
+
+}
+
+public void pluginStopped(PluginEvent e) {
+Plugin plugin = e.getPlugin();
+synchronized(serviceInfoToReceiveMap) {
+for (Iterator iter = 
serviceInfoToReceiveMap.entrySet().iterator(); iter.hasNext();) {
+Map.Entry entry = (Map.Entry) iter.next();
+if(entry.getValue() == plugin) {
+serviceInfoToReceiveMap.remove(entry.getKey());
+}
+}
+}
+discoveredDevices.fireContentsChanged();
+}});
 
 }
 
@@ -127,13 +162,15 @@
 
 }
 
-private static class ServiceInfoListCellRenderer implements
+private class ServiceInfoListCellRenderer implements
 ListCellRenderer {
 
 private JPanel panel = new JPanel(new BorderLayout(15, 15));
 
-private JLabel iconLabel = new JLabel(new ImageIcon(
-ChainsawIcons.ANIM_RADIO_TOWER));
+private final ImageIcon ICON = new ImageIcon(
+ChainsawIcons.ANIM_RADIO_TOWER);
+
+private JLabel iconLabel = new JLabel(ICON);
 
 private JLabel nameLabel = new JLabel();
 
@@ -148,16 +185,15 @@
 panel.setLayout(new BorderLayout());
 panel.add(iconLabel, BorderLayout.WEST);
 
-// TODO scale the icon a bit more, it's a touch small
-
 JPanel centerPanel = new JPanel(new BorderLayout(3, 3));
 
 centerPanel.add(nameLabel, BorderLayout.CENTER);
 centerPanel.add(detailLabel, BorderLayout.SOUTH);
 panel.add(centerPanel, BorderLayout.CENTER);
+
+
 // TODO add autoconnect label
 
-// TODO border etching?
 panel.setBorder(BorderFactory.createEtchedBorder());
 
 }
@@ -174,6 +210,7

svn commit: r348906 - /logging/chainsaw/trunk/build.xml

2005-11-24 Thread psmith
Author: psmith
Date: Thu Nov 24 23:06:30 2005
New Revision: 348906

URL: http://svn.apache.org/viewcvs?rev=348906view=rev
Log:
Added a target that creates a jar with the ZeroConf appender and related 
classes.

This jar can be bundled with a log4j1.2.x distribution to add ZeroConf ability 
to
it's SocketHubAppender. (have tested this with an external project)

Modified:
logging/chainsaw/trunk/build.xml

Modified: logging/chainsaw/trunk/build.xml
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/build.xml?rev=348906r1=348905r2=348906view=diff
==
--- logging/chainsaw/trunk/build.xml (original)
+++ logging/chainsaw/trunk/build.xml Thu Nov 24 23:06:30 2005
@@ -94,6 +94,38 @@
   for VFSLogFilePatternReceiver
 /echo
   /target
+
+  target name=JmDNSCheck
+available classname=javax.jmdns.JmDNS property=jmdns-present
+  classpath refid=compile.classpath/
+/available
+
+echoJmDNS Present: ${jmdns-present}/echo
+  /target
+   
+  target name=BuildZeroConfJar depends=JmDNSCheck, build.chainsaw 
if=jmdns-present
+javac deprecation=${deprecation}
+   srcdir=zeroconf
+  debug=${debug}
+   destdir=${javac.dest}
+  patternset
+include name=**/*.java/
+  /patternset
+  classpath refid=compile.classpath/   
+/javac   
+   
+jar jarfile=${jar.dest}/log4j-zeroconf.jar basedir=${javac.dest}
+ 
includes=${stem}/**/net/ZeroConf*.class,${stem}/**/net/Zeroconf*.class 
excludes=**/*Test*.class
+  manifest
+attribute name=Manifest-version value=1.0/
+section name=org/apache/log4j/
+  attribute name=Implementation-Title value=log4j ZeroConf 
optional extras/
+  attribute name=Implementation-Version value=${version}/
+  attribute name=Implementation-Vendor value=Apache Software 
Foundation/
+/section
+  /manifest
+/jar
+  /target
   
   target name=getdeps
   mkdir dir=deps-dl/



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r348317 - in /logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw: LogUI.java osx/OSXIntegration.java

2005-11-22 Thread psmith
Author: psmith
Date: Tue Nov 22 16:32:12 2005
New Revision: 348317

URL: http://svn.apache.org/viewcvs?rev=348317view=rev
Log:
Fixed a bug with the OSX integration.  ON Quit, the settings were not being 
saved.

Also to prevent OSXfrom quiting before the shutdown thread completes, we
run the shutdown action in the current thread for OSX only.

Modified:
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogUI.java

logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/osx/OSXIntegration.java

Modified: logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogUI.java
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogUI.java?rev=348317r1=348316r2=348317view=diff
==
--- logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogUI.java 
(original)
+++ logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogUI.java Tue 
Nov 22 16:32:12 2005
@@ -1340,11 +1340,10 @@
* Exits the application, ensuring Settings are saved.
*
*/
-  void exit() {
-//TODO Ask the user if they want to save the settings via a dialog.
+  public boolean exit() {
 getSettingsManager().saveSettings();
 
-shutdown();
+return shutdown();
   }
 
   void addWelcomePanel() {
@@ -1464,7 +1463,16 @@
 }
   };
 
-new Thread(runnable).start();
+if (OSXIntegration.IS_OSX) {
+/**
+ * or OSX we do it in the current thread because otherwise returning
+ * will exit the process before it's had a chance to save things
+ * 
+ */
+runnable.run();
+}else {
+new Thread(runnable).start();
+}
 return true;
   }
 

Modified: 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/osx/OSXIntegration.java
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/osx/OSXIntegration.java?rev=348317r1=348316r2=348317view=diff
==
--- 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/osx/OSXIntegration.java
 (original)
+++ 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/osx/OSXIntegration.java
 Tue Nov 22 16:32:12 2005
@@ -55,7 +55,8 @@
 LOG.info(handlePreferences(...) called);
 logui.showApplicationPreferences();
 }else if(handleQuit.equals(method.getName())){
-setHandled(args[0], 
logui.shutdown()?Boolean.TRUE:Boolean.FALSE);
+setHandled(args[0], 
logui.exit()?Boolean.TRUE:Boolean.FALSE);
+
 }else if(handleAbout.equals(method.getName())) {
 logui.showAboutBox();
 setHandled(args[0], Boolean.TRUE);



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r348318 - /logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ProgressPanel.java

2005-11-22 Thread psmith
Author: psmith
Date: Tue Nov 22 16:33:44 2005
New Revision: 348318

URL: http://svn.apache.org/viewcvs?rev=348318view=rev
Log:
Prevents an error if the current thread is the EventDispatch thread,
as this thread is not allowed to call the invokeLater method.

Modified:
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ProgressPanel.java

Modified: 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ProgressPanel.java
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ProgressPanel.java?rev=348318r1=348317r2=348318view=diff
==
--- 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ProgressPanel.java 
(original)
+++ 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ProgressPanel.java 
Tue Nov 22 16:33:44 2005
@@ -61,12 +61,16 @@
 
   public void setProgress(final int progress) {
 try {
-  SwingUtilities.invokeAndWait(
-new Runnable() {
+  Runnable runnable = new Runnable() {
   public void run() {
 progressBar.setValue(progress);
   }
-});
+};
+if (!SwingUtilities.isEventDispatchThread()) {
+SwingUtilities.invokeAndWait(runnable);
+}else {
+runnable.run();
+}
 } catch (InterruptedException e) {
   // TODO Auto-generated catch block
   e.printStackTrace();



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r348319 - /logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/messages/MessageCenter.java

2005-11-22 Thread psmith
Author: psmith
Date: Tue Nov 22 16:35:51 2005
New Revision: 348319

URL: http://svn.apache.org/viewcvs?rev=348319view=rev
Log:
Any class that is using the message center was not also having logging events
displayed within the Chainsaw GUI in the 'chainsaw-log' tab.

Changing the additivity setting allows them to go up to be displayed.

MessageCenter will be retired eventually anyway.

Modified:

logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/messages/MessageCenter.java

Modified: 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/messages/MessageCenter.java
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/messages/MessageCenter.java?rev=348319r1=348318r2=348319view=diff
==
--- 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/messages/MessageCenter.java
 (original)
+++ 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/messages/MessageCenter.java
 Tue Nov 22 16:35:51 2005
@@ -163,7 +163,7 @@
 
   private void setupLogger() {
 logger.addAppender(appender);
-logger.setAdditivity(false);
+logger.setAdditivity(true);
 logger.setLevel(Boolean.getBoolean(log4j.debug)?Level.DEBUG:Level.INFO);
   }
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r348320 - /logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ApplicationPreferenceModel.java

2005-11-22 Thread psmith
Author: psmith
Date: Tue Nov 22 16:36:25 2005
New Revision: 348320

URL: http://svn.apache.org/viewcvs?rev=348320view=rev
Log:
In preparation for this class moving to an XStream based serialization, 
marking this field as transient.

Modified:

logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ApplicationPreferenceModel.java

Modified: 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ApplicationPreferenceModel.java
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ApplicationPreferenceModel.java?rev=348320r1=348319r2=348320view=diff
==
--- 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ApplicationPreferenceModel.java
 (original)
+++ 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ApplicationPreferenceModel.java
 Tue Nov 22 16:36:25 2005
@@ -46,7 +46,7 @@
 
 private String identifierExpression = Constants.HOSTNAME_KEY +  -  + 
Constants.APPLICATION_KEY; 
 
-private final PropertyChangeSupport propertySupport =
+private transient final PropertyChangeSupport propertySupport =
 new PropertyChangeSupport(this);
 private int tabPlacement;
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r348321 - /logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/xstream/

2005-11-22 Thread psmith
Author: psmith
Date: Tue Nov 22 16:37:29 2005
New Revision: 348321

URL: http://svn.apache.org/viewcvs?rev=348321view=rev
Log:
Now all LogPanel preferences bar the Colo(u)r settings are being saved via XML.

Introduced a new XStream converter class to help with the serialization of the 
TableColumns.

Added:
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/xstream/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r348322 - in /logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw: LogPanel.java LogPanelPreferenceModel.java xstream/TableColumnConverter.java

2005-11-22 Thread psmith
Author: psmith
Date: Tue Nov 22 16:37:37 2005
New Revision: 348322

URL: http://svn.apache.org/viewcvs?rev=348322view=rev
Log:
Now all LogPanel preferences bar the Colo(u)r settings are being saved via XML.

Introduced a new XStream converter class to help with the serialization of the 
TableColumns.

Added:

logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/xstream/TableColumnConverter.java
Modified:
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogPanel.java

logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogPanelPreferenceModel.java

Modified: 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogPanel.java
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogPanel.java?rev=348322r1=348321r2=348322view=diff
==
--- logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogPanel.java 
(original)
+++ logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogPanel.java Tue 
Nov 22 16:37:37 2005
@@ -127,6 +127,7 @@
 import org.apache.log4j.chainsaw.prefs.Profileable;
 import org.apache.log4j.chainsaw.prefs.SaveSettingsEvent;
 import org.apache.log4j.chainsaw.prefs.SettingsManager;
+import org.apache.log4j.chainsaw.xstream.TableColumnConverter;
 import org.apache.log4j.helpers.Constants;
 import org.apache.log4j.rule.ExpressionRule;
 import org.apache.log4j.rule.Rule;
@@ -1417,7 +1418,7 @@
 .getSettingsDirectory(), URLEncoder.encode(identifier));
 
 if (xmlFile.exists()) {
-XStream stream = new XStream(new DomDriver());
+XStream stream = buildXStreamForLogPanelPreference();
 try {
 LogPanelPreferenceModel storedPrefs = 
(LogPanelPreferenceModel) stream
 .fromXML(new FileReader(xmlFile));
@@ -1428,22 +1429,10 @@
 }
 }
 
-//TODO needs to be added to LogPanelPreferenceModel?
-logTreePanel.ignore(event.getSettingsStartingWith(Logger.Ignore.));
+logTreePanel.ignore(preferenceModel.getHiddenLoggers());
 
-//first attempt to load encoded file
-File f =
-  new File(
-SettingsManager.getInstance().getSettingsDirectory(), 
URLEncoder.encode(identifier) + COLUMNS_EXTENSION);
-
-if (!f.exists()) {
-f =
-new File(
-  SettingsManager.getInstance().getSettingsDirectory(), identifier 
+ COLUMNS_EXTENSION);
-}
-
-if (f.exists()) {
-  loadColumnSettings(f);
+if (preferenceModel.getColumns().size()0) {
+loadColumnSettings();
 } else {
   loadDefaultColumnSettings(event);
 }
@@ -1475,28 +1464,46 @@
   File xmlFile = new File(SettingsManager.getInstance()
   .getSettingsDirectory(), URLEncoder.encode(identifier));
 
-  XStream stream = new XStream();
-  try {
-  stream.toXML(preferenceModel, new FileWriter(xmlFile));
-  } catch (Exception e) {
-  e.printStackTrace();
-  // TODO need to log this..
-  }
-Set set = logTreePanel.getHiddenSet();
-int index = 0;
-
-for (Iterator iter = set.iterator(); iter.hasNext();) {
-  Object logger = iter.next();
-  event.saveSetting(Logger.Ignore. + index++, logger.toString());
+//  TODO  TableColumnData is no longer required, delete it
+updatePreferenceModelColumnDetails();
+preferenceModel.setHiddenLoggers(new HashSet(logTreePanel.getHiddenSet()));
+
+XStream stream = buildXStreamForLogPanelPreference();
+try {
+stream.toXML(preferenceModel, new FileWriter(xmlFile));
+} catch (Exception ex) {
+ex.printStackTrace();
+// TODO need to log this..
 }
 
-saveColumnSettings();
+//TODO colour settings need to be saved
 saveColorSettings();
   }
 
+private void updatePreferenceModelColumnDetails() {
+preferenceModel.getColumns().clear();
+for (int i = 0; i  table.getColumnModel().getColumnCount(); i++) {
+
+TableColumn c = (TableColumn) table.getColumnModel().getColumn(i);
+
+if (c.getModelIndex()  ChainsawColumns.getColumnsNames().size()) {
+preferenceModel.getColumns().add(c);
+} else {
+logger.debug(Not saving col '  + c.getHeaderValue()
++ ' not part of standard columns);
+}
+}
+}
+
+private XStream buildXStreamForLogPanelPreference() {
+XStream stream = new XStream(new DomDriver());
+stream.registerConverter(new TableColumnConverter());
+return stream;
+}
+
   /**
-   * Display the panel preferences frame
-   */
+ * Display the panel preferences frame
+ */
   void showPreferences() {
 preferencesPanel.updateModel();
 preferencesFrame.show();
@@ -2091,52 +2098,6 @@
   }
 
   /**
-   * Save panel column settings
-   */
-  private

svn commit: r348323 - /logging/chainsaw/trunk/TODO

2005-11-22 Thread psmith
Author: psmith
Date: Tue Nov 22 16:38:08 2005
New Revision: 348323

URL: http://svn.apache.org/viewcvs?rev=348323view=rev
Log:
updated some TODO information

Modified:
logging/chainsaw/trunk/TODO

Modified: logging/chainsaw/trunk/TODO
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/TODO?rev=348323r1=348322r2=348323view=diff
==
--- logging/chainsaw/trunk/TODO (original)
+++ logging/chainsaw/trunk/TODO Tue Nov 22 16:38:08 2005
@@ -30,5 +30,10 @@
- (DONE) About/Preference/Menu bar stuff
- add ant script to create iSaw.dmg

-* Need ta add appropriate credit to stuff in the Help-About menu (ie. XStream 
et al)
-   - implement as Scrolling view port (end title movie style effect.)
\ No newline at end of file
+*(DONE) (Paul) Need ta add appropriate credit to stuff in the Help-About menu 
(ie. XStream et al)
+   - (DONE) implement as Scrolling view port (end title movie style 
effect.)
+   
+- (Paul/Scott) VFS
+   - Fix up VFSPlugin so it's actually useful
+   
+- (Paul) Scrap MessageCenter - just get Chainsaw to log to itself.
\ No newline at end of file



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r348003 - in /logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw: ChainsawAbout.html ChainsawAbout.java

2005-11-21 Thread psmith
Author: psmith
Date: Mon Nov 21 14:18:41 2005
New Revision: 348003

URL: http://svn.apache.org/viewcvs?rev=348003view=rev
Log:
Changed the way the About panel is rendered by using a scrolling
HTML panel instead (ala End Credits).

The links work, but a few of the sites look pretty ordinary inside the
Java HTML renderer. (I'm thinking of a word starting with 's').

Added:
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ChainsawAbout.html
Modified:
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ChainsawAbout.java

Added: 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ChainsawAbout.html
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ChainsawAbout.html?rev=348003view=auto
==
--- 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ChainsawAbout.html 
(added)
+++ 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ChainsawAbout.html 
Mon Nov 21 14:18:41 2005
@@ -0,0 +1,27 @@
+!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 3.2 Final//EN
+HTML
+HEAD
+link rel=stylesheet href=stylesheet.css type=text/css
+/HEAD
+
+BODY
+centerimg align=top src=logo.jpg border=0 alt=Log4j Logo/center
+h1Chainsaw v2/h1
+pBrought to you by the Log4j Dev team/p
+pPlease send questions, bug reports and/or feature requests to 
blog4j-dev@logging.apache.org/b/p
+brbr
+table border=0 width=100%
+tr valign=toptd rowspan=2Principle Developers/tdtdScott 
Deboy/td/tr
+tr valign=toptdPaul Smith/td/tr
+trtd colspan=2nbsp;/td/tr
+tr valign=toptd rowspan=3Contributions from (thanks!):/tdtdCeki 
Guuml;lcuuml; /td/tr
+trtdOliver Burn/td/tr
+trtdStephen Pain/td/tr
+trtd colspan=2nbsp;/td/tr
+tr valign=toptd rowspan=3Using the following technologies/tdtda 
href=http://jakarta.apache.org/oro/index.html;Apache Jakarta ORO/a/td/tr
+tr valign=toptda href=http://jakarta.apache.org/commons/vfs/;Jakarta 
Commons VFS/a/td/tr
+tr valign=toptda href=http://xstream.codehaus.org/;XStream (BSD 
License)/a/td/tr
+
+/table
+/body
+/html
\ No newline at end of file

Modified: 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ChainsawAbout.java
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ChainsawAbout.java?rev=348003r1=348002r2=348003view=diff
==
--- 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ChainsawAbout.java 
(original)
+++ 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ChainsawAbout.java 
Mon Nov 21 14:18:41 2005
@@ -17,92 +17,137 @@
 /*
  * @author Paul Smith [EMAIL PROTECTED]
  *
-*/
+ */
 package org.apache.log4j.chainsaw;
 
 import java.awt.BorderLayout;
 import java.awt.Color;
 import java.awt.GridBagConstraints;
 import java.awt.GridBagLayout;
+import java.awt.Point;
 import java.awt.Toolkit;
 import java.awt.datatransfer.Clipboard;
 import java.awt.datatransfer.StringSelection;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
+import java.io.IOException;
+import java.net.URL;
 
 import javax.swing.BorderFactory;
 import javax.swing.JButton;
 import javax.swing.JDialog;
+import javax.swing.JEditorPane;
 import javax.swing.JFrame;
 import javax.swing.JLabel;
 import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.SwingUtilities;
+import javax.swing.event.HyperlinkEvent;
+import javax.swing.event.HyperlinkListener;
 
+import org.apache.log4j.Logger;
+import org.apache.log4j.chainsaw.help.HelpManager;
 import org.apache.log4j.chainsaw.icons.ChainsawIcons;
 
-
 /**
  * A simple About box telling people stuff about this project
- *
+ * 
  * @author Paul Smith [EMAIL PROTECTED]
- *
+ * 
  */
 class ChainsawAbout extends JDialog {
-  ChainsawAbout(JFrame parent) {
-super(parent, About Chainsaw v2, true);
-//setResizable(false);
-setBackground(Color.white);
-   getContentPane().setLayout(new BorderLayout());
-JPanel panel = new JPanel(new GridBagLayout());
-//panel.setOpaque(false);
-panel.setBackground(Color.white);
-panel.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
-
-GridBagConstraints c = new GridBagConstraints();
-
-c.anchor = GridBagConstraints.WEST;
-c.gridx = 0;
-c.gridy = 0;
-
-final JLabel info =
-  new JLabel(htmlChainsaw 2.0alphapp +
-Brought to you by the Log4J team:p +
-bhttp://logging.apache.org/log4j/bpp +
-  Bug report, mailing list and wiki information:p +
-  bhttp://logging.apache.org/site/bugreport.html/bpp +
-  bContributors:/bulliScott Deboy lt;[EMAIL 
PROTECTED]gt;/liliPaul Smith lt;[EMAIL PROTECTED]gt;/liliCeki 
Guuml;lcuuml; lt;[EMAIL PROTECTED]gt;/liliOliver Burn/liliStephen 
Pain/li/ul/html);
-
-  JButton button = new JButton(Copy bug report link to clipboard);
-  button.addActionListener(new ActionListener() {
-  public void actionPerformed(ActionEvent

svn commit: r345810 - /logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/osx/

2005-11-20 Thread psmith
Author: psmith
Date: Sun Nov 20 18:31:18 2005
New Revision: 345810

URL: http://svn.apache.org/viewcvs?rev=345810view=rev
Log:
Added native OS X support to Chainsaw.

Used dynamic(reflection) to determine if the current running OS is OSX
and if the appropriate Mac Java extensions are available, and dynamically
install the hooks so that the Menu bar appears where it should in OSX, plus
place Preferences/About and Quit menu items where they should too (don't
display them in the other menu items either).

Using dynamic means removes the need for a user to have OS X to compile 
Chainsaw.

Also added a iSaw target (yes it sounds like eyesore... can't think of 
anything else
as yet) that uses jarbundler to create a .app folder of the Chainsaw 
distribution.

I'm currently manually creating a .dmg file with Disk Utility, but hope to ant
that step as well.

Will get the user community to test the .dmg distribution and get feedback 
before placing
it as a supported distribution from the website.

Added:
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/osx/


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r345811 - in /logging/chainsaw/trunk: ./ packaging/ src/java/org/apache/log4j/chainsaw/ src/java/org/apache/log4j/chainsaw/help/ src/java/org/apache/log4j/chainsaw/osx/ src/java/org/apache

2005-11-20 Thread psmith
Author: psmith
Date: Sun Nov 20 18:31:35 2005
New Revision: 345811

URL: http://svn.apache.org/viewcvs?rev=345811view=rev
Log:
Added native OS X support to Chainsaw.

Used dynamic(reflection) to determine if the current running OS is OSX
and if the appropriate Mac Java extensions are available, and dynamically
install the hooks so that the Menu bar appears where it should in OSX, plus
place Preferences/About and Quit menu items where they should too (don't
display them in the other menu items either).

Using dynamic means removes the need for a user to have OS X to compile 
Chainsaw.

Also added a iSaw target (yes it sounds like eyesore... can't think of 
anything else
as yet) that uses jarbundler to create a .app folder of the Chainsaw 
distribution.

I'm currently manually creating a .dmg file with Disk Utility, but hope to ant
that step as well.

Will get the user community to test the .dmg distribution and get feedback 
before placing
it as a supported distribution from the website.

Added:
logging/chainsaw/trunk/packaging/logo.icns   (with props)

logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/osx/OSXIntegration.java
Modified:
logging/chainsaw/trunk/TODO
logging/chainsaw/trunk/build.xml

logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/ChainsawToolBarAndMenus.java
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/FileMenu.java
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogUI.java

logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/help/release-notes.html

logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/version/VersionManager.java

Modified: logging/chainsaw/trunk/TODO
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/TODO?rev=345811r1=345810r2=345811view=diff
==
--- logging/chainsaw/trunk/TODO (original)
+++ logging/chainsaw/trunk/TODO Sun Nov 20 18:31:35 2005
@@ -6,22 +6,29 @@
 - Maybe a wiki doc describing the different appender/receiver combinations and 
usage scenarios (when would I use x, vs y appender/receiver combo)
   (this is worth considering creating a PDF guide)
 
-- all settings saved as xml or regular text files instead of combination of 
properties  serialized java object files
-  (use Xstream for bean serialization - BSD license, need to check whether we 
can use that)
+- (PARTIALLY DONE)(Paul) all settings saved as xml or regular text files 
instead of combination of properties  serialized java object files
+  (use Xstream for bean serialization)
   
-- would be nice to be able to have a way to modify the detail pane layout  
save it as a default layout (default layout would always be used to display 
events - maybe not bother with settings per tab)
+- (IN PROGRESS)(Paul) would be nice to be able to have a way to modify the 
detail pane layout  save it as a default layout (default layout would always 
be used to display events - maybe not bother with settings per tab)
   (Xstream handy here)
   
-- someone mentioned in log4j-user that they'd like a way to auto-load an xml 
log file on chainsaw start (err...could just write an xml file receiver..I 
already did it but didn't create a real receiver).
+- (PARTIALLY DONE))(Paul)someone mentioned in log4j-user that they'd like a 
way to auto-load an xml log file on chainsaw start (err...could just write an 
xml file receiver..I already did it but didn't create a real receiver).
   - Do this via an MRU list in the File menu
   
-- I talked the JToaster guy into changing his code to ASL v2, so I'd like to 
support it in the ui..maybe just app-wide expression controls notification 
(with associated saved preference)
+- (Scott) I talked the JToaster guy into changing his code to ASL v2, so I'd 
like to support it in the ui..maybe just app-wide expression controls 
notification (with associated saved preference)
 - might be nice to remember refine focus expressions per tab
 - gui improvements
 - docs (at least the wiki more often), improvements to the tutorial
 
 FYI, I also talked to the person who wrote rssappender and she's probably 
going to make changes to it to be 1.3 compatible so that it could be included 
in the core (I assume something like that would be useful to some folks).
 
-- Now that JmDNS is licensed with ASL, we can create a 
ZeroConfSocketHubAppender and have Chainsaw autodetect things to connect to.
+- (Paul) Now that JmDNS is licensed with ASL, we can create a 
ZeroConfSocketHubAppender and have Chainsaw autodetect things to connect to.
 
-- For jars that are not ASL compatible, maybe have Chainsaw auto-download and 
install in the .plugins area?
\ No newline at end of file
+- For jars that are not ASL compatible, maybe have Chainsaw auto-download and 
install in the .plugins area?
+
+- (Paul) add OSX integration
+   - (DONE) About/Preference/Menu bar stuff
+   - add ant script to create iSaw.dmg
+   
+* Need ta add appropriate

svn commit: r345585 - /logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/FileMenu.java

2005-11-18 Thread psmith
Author: psmith
Date: Fri Nov 18 14:15:41 2005
New Revision: 345585

URL: http://svn.apache.org/viewcvs?rev=345585view=rev
Log:
removed errant import from test source.

Was only using that class during initial work to hold some test
MRU data, no longer needed.

gump.setGrumpiness(Grumpy.SILENT)

Modified:
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/FileMenu.java

Modified: 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/FileMenu.java
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/FileMenu.java?rev=345585r1=345584r2=345585view=diff
==
--- logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/FileMenu.java 
(original)
+++ logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/FileMenu.java Fri 
Nov 18 14:15:41 2005
@@ -37,7 +37,6 @@
 
 import org.apache.log4j.chainsaw.icons.ChainsawIcons;
 import org.apache.log4j.chainsaw.prefs.MRUFileList;
-import org.apache.log4j.chainsaw.prefs.MRUFileListTest;
 import org.apache.log4j.xml.UtilLoggingXMLDecoder;
 import org.apache.log4j.xml.XMLDecoder;
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r345593 - /logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogPanel.java

2005-11-18 Thread psmith
Author: psmith
Date: Fri Nov 18 14:56:29 2005
New Revision: 345593

URL: http://svn.apache.org/viewcvs?rev=345593view=rev
Log:
Standard LogPanel preferences now serialized to XML and restored
when needed.

Will begin to move Column, Colours and LogTreePanel into LogPanel
preferences next.

Modified:
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogPanel.java

Modified: 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogPanel.java
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogPanel.java?rev=345593r1=345592r2=345593view=diff
==
--- logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogPanel.java 
(original)
+++ logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogPanel.java Fri 
Nov 18 14:56:29 2005
@@ -46,6 +46,8 @@
 import java.io.FileInputStream;
 import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
+import java.io.FileReader;
+import java.io.FileWriter;
 import java.io.IOException;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
@@ -130,6 +132,10 @@
 import org.apache.log4j.rule.Rule;
 import org.apache.log4j.spi.LoggingEvent;
 import org.apache.log4j.spi.LoggingEventFieldResolver;
+import org.omg.PortableInterceptor.LOCATION_FORWARD;
+
+import com.thoughtworks.xstream.XStream;
+import com.thoughtworks.xstream.io.xml.DomDriver;
 
 
 /**
@@ -1406,17 +1412,23 @@
* @see LogPanelPreferenceModel
*/
   public void loadSettings(LoadSettingsEvent event) {
-preferenceModel.setLevelIcons(event.asBoolean(levelIcons));
-preferenceModel.setDateFormatPattern(
-  event.getSetting(dateFormatPattern));
-preferenceModel.setLoggerPrecision(event.getSetting(loggerPrecision));
-preferenceModel.setToolTips(event.asBoolean(toolTips));
-preferenceModel.setScrollToBottom(event.asBoolean(scrollToBottom));
-scroll = event.asBoolean(scrollToBottom);
-preferenceModel.setLogTreePanelVisible(
-  event.asBoolean(logTreePanelVisible));
-preferenceModel.setDetailPaneVisible(event.asBoolean(detailPaneVisible));
 
+File xmlFile = new File(SettingsManager.getInstance()
+.getSettingsDirectory(), URLEncoder.encode(identifier));
+
+if (xmlFile.exists()) {
+XStream stream = new XStream(new DomDriver());
+try {
+LogPanelPreferenceModel storedPrefs = 
(LogPanelPreferenceModel) stream
+.fromXML(new FileReader(xmlFile));
+preferenceModel.apply(storedPrefs);
+} catch (Exception e) {
+e.printStackTrace();
+// TODO need to log this..
+}
+}
+
+//TODO needs to be added to LogPanelPreferenceModel?
 logTreePanel.ignore(event.getSettingsStartingWith(Logger.Ignore.));
 
 //first attempt to load encoded file
@@ -1460,17 +1472,16 @@
* @see LogPanelPreferenceModel
*/
   public void saveSettings(SaveSettingsEvent event) {
-event.saveSetting(levelIcons, preferenceModel.isLevelIcons());
-event.saveSetting(
-  dateFormatPattern, preferenceModel.getDateFormatPattern());
-event.saveSetting(loggerPrecision, preferenceModel.getLoggerPrecision());
-event.saveSetting(toolTips, preferenceModel.isToolTips());
-event.saveSetting(scrollToBottom, preferenceModel.isScrollToBottom());
-event.saveSetting(
-  detailPaneVisible, preferenceModel.isDetailPaneVisible());
-event.saveSetting(
-  logTreePanelVisible, preferenceModel.isLogTreePanelVisible());
+  File xmlFile = new File(SettingsManager.getInstance()
+  .getSettingsDirectory(), URLEncoder.encode(identifier));
 
+  XStream stream = new XStream();
+  try {
+  stream.toXML(preferenceModel, new FileWriter(xmlFile));
+  } catch (Exception e) {
+  e.printStackTrace();
+  // TODO need to log this..
+  }
 Set set = logTreePanel.getHiddenSet();
 int index = 0;
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r345594 - in /logging/chainsaw/trunk/packaging: chainsaw.bat chainsaw.sh chainsawWebStart.jnlp

2005-11-18 Thread psmith
Author: psmith
Date: Fri Nov 18 14:57:52 2005
New Revision: 345594

URL: http://svn.apache.org/viewcvs?rev=345594view=rev
Log:
Updated some distribution files with the new XStream jar requirement


Modified:
logging/chainsaw/trunk/packaging/chainsaw.bat
logging/chainsaw/trunk/packaging/chainsaw.sh
logging/chainsaw/trunk/packaging/chainsawWebStart.jnlp

Modified: logging/chainsaw/trunk/packaging/chainsaw.bat
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/packaging/chainsaw.bat?rev=345594r1=345593r2=345594view=diff
==
--- logging/chainsaw/trunk/packaging/chainsaw.bat (original)
+++ logging/chainsaw/trunk/packaging/chainsaw.bat Fri Nov 18 14:57:52 2005
@@ -1 +1 @@
-java -classpath 
log4j-1.3alpha-7.jar;log4j-chainsaw-1.3alpha-7.jar;ugli-simple.jar;log4j-xml.jar;log4j-optional.jar;log4j-oro.jar
 org.apache.log4j.chainsaw.LogUI
\ No newline at end of file
+java -classpath 
log4j-1.3alpha-7.jar;log4j-chainsaw-1.3alpha-7.jar;ugli-simple.jar;log4j-xml.jar;log4j-optional.jar;log4j-oro.jar;xstream-1.1.2.jar
 org.apache.log4j.chainsaw.LogUI
\ No newline at end of file

Modified: logging/chainsaw/trunk/packaging/chainsaw.sh
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/packaging/chainsaw.sh?rev=345594r1=345593r2=345594view=diff
==
Binary files - no diff available.

Modified: logging/chainsaw/trunk/packaging/chainsawWebStart.jnlp
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/packaging/chainsawWebStart.jnlp?rev=345594r1=345593r2=345594view=diff
==
--- logging/chainsaw/trunk/packaging/chainsawWebStart.jnlp (original)
+++ logging/chainsaw/trunk/packaging/chainsawWebStart.jnlp Fri Nov 18 14:57:52 
2005
@@ -27,6 +27,7 @@
 jar href=lib/log4j-oro.jar/
 jar href=lib/ugli-simple.jar/
 jar href=lib/jakarta-oro-2.0.6.jar/ 
+jar href=lib/xstream-1.1.2.jar/ 
   /resources 
   application-desc main-class=org.apache.log4j.chainsaw.LogUI/ 
 /jnlp 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r345596 - in /logging/chainsaw/trunk: HOWTOBUILD.txt build.properties.sample

2005-11-18 Thread psmith
Author: psmith
Date: Fri Nov 18 15:02:28 2005
New Revision: 345596

URL: http://svn.apache.org/viewcvs?rev=345596view=rev
Log:
Tweaked some of the documentation a touch, added reference
to XStream.

Modified:
logging/chainsaw/trunk/HOWTOBUILD.txt
logging/chainsaw/trunk/build.properties.sample

Modified: logging/chainsaw/trunk/HOWTOBUILD.txt
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/HOWTOBUILD.txt?rev=345596r1=345595r2=345596view=diff
==
--- logging/chainsaw/trunk/HOWTOBUILD.txt (original)
+++ logging/chainsaw/trunk/HOWTOBUILD.txt Fri Nov 18 15:02:28 2005
@@ -19,6 +19,7 @@
 
 * log4j1.3 full jar
 * jakarata ORO 2.0.6+
+* XStream (http://xstream.codehaus.org)
 
 Optionally, you can add Jakarta Commons VFS, and it's dependencies to have 
extra features inside Chainsaw
 See http://jakarta.apache.org/commons/sandbox/vfs/ for more information

Modified: logging/chainsaw/trunk/build.properties.sample
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/build.properties.sample?rev=345596r1=345595r2=345596view=diff
==
--- logging/chainsaw/trunk/build.properties.sample (original)
+++ logging/chainsaw/trunk/build.properties.sample Fri Nov 18 15:02:28 2005
@@ -1,11 +1,14 @@
-# Describes the relative or full path to the Jakarta ORO Reg Exp jar file
-# Required if you wish to use LogFilePatternReceiver or LikeRule (regexp)
-#jakarta-oro.jar=../oro/jakarta-oro-2.0.8.jar
 
-# For optimal operation, you should obtain the VFS jar (see 
http://jakarta.apache.org/commons/sandbox/vfs/)
-# Required if you wish to compile and include the 
+# Chainsaw requires the following jars to build and run:
+# * Jakarta ORG 2.0.6+
+# * Jakarta Commons VFS 1.0 RC1+ (requires sub-dependecy of Jakarta Commons 
Logging).
+# * XStream - http://xstream.codehaus.org (BSD License)
+# 
+# Place the Jars in a local 'lib' folder, and Chainsaw should compile and run
+#
+# Jakarta Commons VFS Required if you wish to compile and include the 
 # org.apache.log4j.chainsaw.vfs.VFSLogFilePatternReceiver virtual file system 
receiver
-# to access log files in Chainsaw
+# to access log files in Chainsaw, but is optional.
 #
 # See http://jakarta.apache.org/commons/sandbox/vfs/filesystems.html 
 # for a full description of supported file systems (ssh, zip, etc).



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r344246 - in /logging/chainsaw/trunk: src/java/org/apache/log4j/chainsaw/ src/java/org/apache/log4j/chainsaw/prefs/ tests/org/apache/log4j/chainsaw/prefs/

2005-11-14 Thread psmith
Author: psmith
Date: Mon Nov 14 13:57:11 2005
New Revision: 344246

URL: http://svn.apache.org/viewcvs?rev=344246view=rev
Log:
Added MRU File list to File menu.

Now when a user opens a local XML log file, it is remembered via
a MRU list, which is persisted using the XStream lib (BSD license).

Currently only log4j format log files are remembered, but there are
some hooks to add java.util loggings own MRU list soon.

Added:

logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/prefs/MRUFileList.java

logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/prefs/MRUFileListPreferenceSaver.java
logging/chainsaw/trunk/tests/org/apache/log4j/chainsaw/prefs/

logging/chainsaw/trunk/tests/org/apache/log4j/chainsaw/prefs/MRUFileListTest.java
Modified:

logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/FileLoadAction.java
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/FileMenu.java
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/LogUI.java

Modified: 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/FileLoadAction.java
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/FileLoadAction.java?rev=344246r1=344245r2=344246view=diff
==
--- 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/FileLoadAction.java 
(original)
+++ 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/FileLoadAction.java 
Mon Nov 14 13:57:11 2005
@@ -31,6 +31,7 @@
 import javax.swing.filechooser.FileFilter;
 
 import org.apache.log4j.Logger;
+import org.apache.log4j.chainsaw.prefs.MRUFileList;
 import org.apache.log4j.helpers.Constants;
 import org.apache.log4j.spi.Decoder;
 import org.apache.log4j.spi.LoggingEvent;
@@ -128,6 +129,7 @@
 
 if (url != null) {
 importURL(parent.handler, decoder, name, url);
+MRUFileList.log4jMRU().opened(url);
 }
 }
 
@@ -157,6 +159,7 @@
 // TODO Handle the error with a nice msg
 LOG.error(e1);
 }
+MRUFileList.log4jMRU().opened(urlToUse);
 }
 }).start();
 }

Modified: 
logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/FileMenu.java
URL: 
http://svn.apache.org/viewcvs/logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/FileMenu.java?rev=344246r1=344245r2=344246view=diff
==
--- logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/FileMenu.java 
(original)
+++ logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/FileMenu.java Mon 
Nov 14 13:57:11 2005
@@ -23,6 +23,8 @@
 import java.awt.event.ActionEvent;
 import java.awt.event.InputEvent;
 import java.awt.event.KeyEvent;
+import java.net.URL;
+import java.util.Iterator;
 
 import javax.swing.AbstractAction;
 import javax.swing.Action;
@@ -30,8 +32,12 @@
 import javax.swing.JMenu;
 import javax.swing.JMenuItem;
 import javax.swing.KeyStroke;
+import javax.swing.event.ChangeEvent;
+import javax.swing.event.ChangeListener;
 
 import org.apache.log4j.chainsaw.icons.ChainsawIcons;
+import org.apache.log4j.chainsaw.prefs.MRUFileList;
+import org.apache.log4j.chainsaw.prefs.MRUFileListTest;
 import org.apache.log4j.xml.UtilLoggingXMLDecoder;
 import org.apache.log4j.xml.XMLDecoder;
 
@@ -112,9 +118,53 @@
 addSeparator();
 add(saveFile);
 addSeparator();
+
+final JMenu mrulog4j = new JMenu(MRU...);
+
+  
+
+MRUFileList.addChangeListener(new ChangeListener() {
+
+public void stateChanged(ChangeEvent e) {
+
+buildMRUMenu(mrulog4j, logUI);
+}
+
+});
+buildMRUMenu(mrulog4j, logUI);
+
+add(mrulog4j);
+addSeparator();
 add(menuItemExit);
+
+
   }
 
+  private void buildMRUMenu(final JMenu mrulog4j, final LogUI logui) {
+mrulog4j.removeAll();
+int counter = 1;
+if (MRUFileList.log4jMRU().getMRUList().size()  0) {
+for (Iterator iter = 
MRUFileList.log4jMRU().getMRUList().iterator(); iter
+.hasNext();) {
+final URL url = (URL) iter.next();
+// TODO work out the 'name', for local files it can't just be 
the full path
+final String name = 
url.getProtocol().startsWith(file)?url.getPath().substring(url.getPath().lastIndexOf('/')+1):url.getPath();
+String title = (counter++) +  -  + url.toExternalForm();
+JMenuItem menuItem = new JMenuItem(new AbstractAction(title) {
+
+public void actionPerformed(ActionEvent e) {
+FileLoadAction.importURL(logui.handler,
+new XMLDecoder(), name, url);
+}
+});
+mrulog4j.add(menuItem);
+}
+} else {
+JMenuItem none

  1   2   >