[jboss-cvs] JBossAS SVN: r94779 - projects/vfs/branches/dml-zip-rework/src/main/java/org/jboss/vfs/spi.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Oct 13 12:37:21 EDT 2009
Author: david.lloyd at jboss.com
Date: 2009-10-13 12:37:21 -0400 (Tue, 13 Oct 2009)
New Revision: 94779
Modified:
projects/vfs/branches/dml-zip-rework/src/main/java/org/jboss/vfs/spi/AssemblyFileSystem.java
projects/vfs/branches/dml-zip-rework/src/main/java/org/jboss/vfs/spi/JavaZipFileSystem.java
projects/vfs/branches/dml-zip-rework/src/main/java/org/jboss/vfs/spi/RealFileSystem.java
Log:
Filesystem lifecycle logging
Modified: projects/vfs/branches/dml-zip-rework/src/main/java/org/jboss/vfs/spi/AssemblyFileSystem.java
===================================================================
--- projects/vfs/branches/dml-zip-rework/src/main/java/org/jboss/vfs/spi/AssemblyFileSystem.java 2009-10-13 16:32:43 UTC (rev 94778)
+++ projects/vfs/branches/dml-zip-rework/src/main/java/org/jboss/vfs/spi/AssemblyFileSystem.java 2009-10-13 16:37:21 UTC (rev 94779)
@@ -32,6 +32,7 @@
import org.jboss.vfs.VirtualFile;
import org.jboss.vfs.VirtualFileAssembly;
+import org.jboss.logging.Logger;
/**
* FileSystem used to mount an Assembly into the VFS.
@@ -40,10 +41,13 @@
*/
public class AssemblyFileSystem implements FileSystem {
+ private static final Logger log = Logger.getLogger("org.jboss.vfs.assembly");
+
private final VirtualFileAssembly assembly;
public AssemblyFileSystem(VirtualFileAssembly assembly) {
this.assembly = assembly;
+ log.tracef("Constructed a new assembly filesystem for %s", assembly);
}
/** {@inheritDoc} */
@@ -106,6 +110,7 @@
/** {@inheritDoc} */
public void close() throws IOException {
+ log.tracef("Closing assembly filesystem %s", this);
assembly.close();
}
Modified: projects/vfs/branches/dml-zip-rework/src/main/java/org/jboss/vfs/spi/JavaZipFileSystem.java
===================================================================
--- projects/vfs/branches/dml-zip-rework/src/main/java/org/jboss/vfs/spi/JavaZipFileSystem.java 2009-10-13 16:32:43 UTC (rev 94778)
+++ projects/vfs/branches/dml-zip-rework/src/main/java/org/jboss/vfs/spi/JavaZipFileSystem.java 2009-10-13 16:37:21 UTC (rev 94779)
@@ -46,6 +46,7 @@
import org.jboss.vfs.VFSUtils;
import org.jboss.vfs.VirtualFile;
import org.jboss.vfs.util.PathTokenizer;
+import org.jboss.logging.Logger;
/**
* {@inheritDoc}
@@ -55,6 +56,8 @@
*/
public final class JavaZipFileSystem implements FileSystem {
+ private static final Logger log = Logger.getLogger("org.jboss.vfs.zip");
+
private final JarFile zipFile;
private final File archiveFile;
private final long zipTime;
@@ -121,6 +124,7 @@
this.rootNode = rootNode;
contentsDir = tempDir.getFile("contents");
contentsDir.mkdir();
+ log.tracef("Created zip filesystem for file %s in temp dir %s", archiveFile, tempDir);
}
private static <T> Iterable<T> iter(final Enumeration<T> entries) {
@@ -274,6 +278,7 @@
}
public void close() throws IOException {
+ log.tracef("Closing zip filesystem %s", this);
VFSUtils.safeClose(new Closeable() {
public void close() throws IOException {
zipFile.close();
Modified: projects/vfs/branches/dml-zip-rework/src/main/java/org/jboss/vfs/spi/RealFileSystem.java
===================================================================
--- projects/vfs/branches/dml-zip-rework/src/main/java/org/jboss/vfs/spi/RealFileSystem.java 2009-10-13 16:32:43 UTC (rev 94778)
+++ projects/vfs/branches/dml-zip-rework/src/main/java/org/jboss/vfs/spi/RealFileSystem.java 2009-10-13 16:37:21 UTC (rev 94779)
@@ -23,6 +23,7 @@
package org.jboss.vfs.spi;
import org.jboss.vfs.VirtualFile;
+import org.jboss.logging.Logger;
import java.io.File;
import java.io.IOException;
@@ -43,6 +44,8 @@
*/
public static final RealFileSystem ROOT_INSTANCE = new RealFileSystem(new File(""));
+ private static final Logger log = Logger.getLogger("org.jboss.vfs.real");
+
private final File realRoot;
/**
@@ -52,6 +55,7 @@
*/
public RealFileSystem(File realRoot) {
this.realRoot = realRoot;
+ log.tracef("Constructed real filesystem at root %s", realRoot);
}
/**
More information about the jboss-cvs-commits
mailing list