billbarker 2002/09/12 22:31:08
Modified: src/share/org/apache/tomcat/util/io FileUtil.java
Log:
Converting to commons-logging.
Revision Changes Path
1.8 +10 -9 jakarta-tomcat/src/share/org/apache/tomcat/util/io/FileUtil.java
Index: FileUtil.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/io/FileUtil.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- FileUtil.java 22 Jan 2002 06:09:51 -0000 1.7
+++ FileUtil.java 13 Sep 2002 05:31:08 -0000 1.8
@@ -67,7 +67,6 @@
import java.io.*;
import java.util.zip.*;
-import org.apache.tomcat.util.log.*;
/*
* FileUtil contains utils for dealing with Files. Some of these are
@@ -128,7 +127,9 @@
// XXX tc_log is the default channel in tomcat, this component
//should be able to log in a specific channel.
- static Log loghelper = Log.getLog("tc/FileUtil", "FileUtil");
+ static org.apache.commons.logging.Log logger =
+ org.apache.commons.logging.LogFactory.getLog(DependClassLoader.class);
+
/** All the safety checks from getRealPath() and
DefaultServlet.
@@ -187,8 +188,7 @@
try {
canPath=new File(realPath).getCanonicalPath();
} catch( IOException ex ) {
- //log("safePath: " + realPath, ex);
- loghelper.log("in safePath(" + base +", "+path + "), realPath=" +
realPath, ex);
+ logger.error("in safePath(" + base +", "+path + "), realPath=" + realPath,
ex);
return null;
}
@@ -405,8 +405,9 @@
fos.close();
}
} catch( FileNotFoundException ex ) {
- //loghelper.log("FileNotFoundException: " +
- // ze.getName(), Logger.ERROR );
+ if(logger.isDebugEnabled())
+ logger.debug("FileNotFoundException: " +
+ ze.getName(), Logger.ERROR );
throw ex;
}
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>