logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sde...@apache.org
Subject svn commit: r326347 - in /logging/chainsaw/trunk: .classpath src/java/org/apache/log4j/chainsaw/vfs/VFSLogFilePatternReceiver.java
Date Wed, 19 Oct 2005 02:55:02 GMT
Author: sdeboy
Date: Tue Oct 18 19:54:59 2005
New Revision: 326347

URL: http://svn.apache.org/viewcvs?rev=326347&view=rev
Log:
Removing username and pass in APPLICATION property, which will prevent the username/pass from
showing up in the tab - when using vfs sftp vfslogfilepatternreceiver

Modified:
    logging/chainsaw/trunk/.classpath
    logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/vfs/VFSLogFilePatternReceiver.java

Modified: logging/chainsaw/trunk/.classpath
URL: http://svn.apache.org/viewcvs/logging/chainsaw/trunk/.classpath?rev=326347&r1=326346&r2=326347&view=diff
==============================================================================
--- logging/chainsaw/trunk/.classpath (original)
+++ logging/chainsaw/trunk/.classpath Tue Oct 18 19:54:59 2005
@@ -2,7 +2,9 @@
 <classpath>
 	<classpathentry kind="src" path="src/java"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-	<classpathentry kind="src" path="/logging-log4j"/>
-	<classpathentry kind="lib" path="/workspace/commons-vfs-1.0-dev.jar"/>
+	<classpathentry kind="src" path="tests"/>
+	<classpathentry combineaccessrules="false" kind="src" path="/log4j"/>
+	<classpathentry kind="lib" path="C:/downloads/vfs/commons-vfs/commons-vfs-1.0-RC2.jar"/>
+	<classpathentry kind="lib" path="C:/downloads/ant/junit.jar"/>
 	<classpathentry kind="output" path="build"/>
 </classpath>

Modified: logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/vfs/VFSLogFilePatternReceiver.java
URL: http://svn.apache.org/viewcvs/logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/vfs/VFSLogFilePatternReceiver.java?rev=326347&r1=326346&r2=326347&view=diff
==============================================================================
--- logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/vfs/VFSLogFilePatternReceiver.java
(original)
+++ logging/chainsaw/trunk/src/java/org/apache/log4j/chainsaw/vfs/VFSLogFilePatternReceiver.java
Tue Oct 18 19:54:59 2005
@@ -19,10 +19,12 @@
 import java.io.IOException;
 import java.io.InputStreamReader;
 import java.io.Reader;
+
 import org.apache.commons.vfs.FileObject;
 import org.apache.commons.vfs.FileSystemException;
 import org.apache.commons.vfs.FileSystemManager;
 import org.apache.commons.vfs.VFS;
+import org.apache.commons.vfs.provider.URLFileName;
 import org.apache.log4j.varia.LogFilePatternReceiver;
 
 /**
@@ -142,6 +144,12 @@
           FileSystemManager fileSystemManager = VFS.getManager();
           FileObject fileObject = fileSystemManager.resolveFile(getFileURL());
           reader = new InputStreamReader(fileObject.getContent().getInputStream());
+          //now that we have a reader, remove additional portions of the file url (sftp passwords,
etc.)
+          //check to see if the name is a URLFileName..if so, set file name to not include
username/pass
+          if (fileObject.getName() instanceof URLFileName) {
+            URLFileName urlFileName = (URLFileName)fileObject.getName();
+        	setFileURL(urlFileName.getScheme() + "://" + urlFileName.getHostName() + urlFileName.getPath());
+          }
         } catch (FileSystemException fse) {
           getLogger().info("file not available - will try again in 10 seconds");
           synchronized(this) {



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


Mime
View raw message