Author: tfischer
Date: Tue Sep 10 06:44:55 2013
New Revision: 1521362
URL: http://svn.apache.org/r1521362
Log:
TORQUE-292 use debug instead of trace logging for last modified check
Modified:
db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/Controller.java
Modified:
db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/Controller.java
URL:
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/Controller.java?rev=1521362&r1=1521361&r2=1521362&view=diff
==============================================================================
---
db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/Controller.java
(original)
+++
db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/Controller.java
Tue Sep 10 06:44:55 2013
@@ -632,11 +632,11 @@ public class Controller
File sourceFile = source.getSourceFile();
if (sourceFile == null)
{
- log.trace("checkSourceModified(): "
+ log.debug("checkSourceModified(): "
+ "source file cannot be determined, return true");
return true;
}
- String absoluteSourcePath = sourceFile.getAbsoluteFile().toString();
+ String absoluteSourcePath = sourceFile.getAbsolutePath();
if (sourceModifiedCache.get(absoluteSourcePath) != null)
{
return sourceModifiedCache.get(absoluteSourcePath);
@@ -645,7 +645,7 @@ public class Controller
Date sourceLastModified = source.getLastModified();
if (sourceLastModified == null)
{
- log.trace("checkSourceModified(): "
+ log.debug("checkSourceModified(): "
+ "lastModified date of source cannot be determined, "
+ "return true");
sourceModifiedCache.put(absoluteSourcePath, true);
@@ -659,14 +659,14 @@ public class Controller
sourceFile.getName() + CHECKSUM_SUFFIX);
if (!lastChangesFile.exists())
{
- log.trace("checkSourceModified(): "
+ log.debug("checkSourceModified(): "
+ "lastChanges file does not exist, return true");
sourceModifiedCache.put(absoluteSourcePath, true);
return true;
}
if (lastChangesFile.lastModified() < sourceLastModified.getTime())
{
- log.trace("checkSourceModified(): "
+ log.debug("checkSourceModified(): "
+ "lastChanges file was last changed before source ("
+ new Date(lastChangesDir.lastModified())
+ " < "
@@ -691,12 +691,12 @@ public class Controller
}
if (!Arrays.equals(lastChangesContent, source.getContentChecksum()))
{
- log.trace("checkSourceModified(): "
+ log.debug("checkSourceModified(): "
+ " different checksum, return true");
sourceModifiedCache.put(absoluteSourcePath, true);
return true;
}
- log.trace("checkSourceModified() : returning false");
+ log.debug("checkSourceModified() : returning false");
sourceModifiedCache.put(absoluteSourcePath, false);
return false;
}
@@ -716,7 +716,7 @@ public class Controller
File sourceFile = source.getSourceFile();
if (sourceFile == null)
{
- log.trace("writeLastModified(): "
+ log.debug("writeLastModified(): "
+ "source file cannot be determined, do nothing");
return;
}
@@ -752,6 +752,9 @@ public class Controller
lastChangesFile,
NO_CHECKSUM_CONTENT,
"ISO-8859-1");
+ log.debug("writeLastModified(): "
+ + "checksum written to file "
+ + lastChangesFile.getAbsolutePath());
}
}
catch (IOException e)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]