# HG changeset patch # User Sascha L. Teichmann # Date 1253781923 0 # Node ID 5fbd8e65bdf55e70aeb375e7687bded6ea4de23a # Parent 5e4bc24ea4387933fc836b29858d91fb258c8747 Added debug output to DefaultArtifact tracing of artifact lifecyle easier. artifacts/trunk@121 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 5e4bc24ea438 -r 5fbd8e65bdf5 Changelog --- a/Changelog Wed Sep 23 16:55:12 2009 +0000 +++ b/Changelog Thu Sep 24 08:45:23 2009 +0000 @@ -1,3 +1,8 @@ +2009-09-24 Sascha L. Teichmann + + * artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultArtifact.java: + Added debug output to make tracing of artifact lifecyle easier. + 2009-09-23 Sascha L. Teichmann * artifact-database/doc/schema-pg.sql, artifact-database/doc/schema-h2.sql: diff -r 5e4bc24ea438 -r 5fbd8e65bdf5 artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultArtifact.java --- a/artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultArtifact.java Wed Sep 23 16:55:12 2009 +0000 +++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/DefaultArtifact.java Thu Sep 24 08:45:23 2009 +0000 @@ -25,22 +25,39 @@ } public String identifier() { + if (logger.isDebugEnabled()) { + logger.debug("DefaultArtifact.identifier: " + identifier); + } return this.identifier; } public String hash() { - return String.valueOf(hashCode()); + String hash = String.valueOf(hashCode()); + if (logger.isDebugEnabled()) { + logger.debug("DefaultArtifact.hashCode: " + + identifier + " (" + hash + ")"); + } + return hash; } public Document describe(CallContext context) { + if (logger.isDebugEnabled()) { + logger.debug("DefaultArtifact.describe: " + identifier); + } return XMLUtils.newDocument(); } public Document advance(Document target, CallContext context) { + if (logger.isDebugEnabled()) { + logger.debug("DefaultArtifact.advance: " + identifier); + } return XMLUtils.newDocument(); } public Document feed(Document target, CallContext context) { + if (logger.isDebugEnabled()) { + logger.debug("DefaultArtifact.feed: " + identifier); + } return XMLUtils.newDocument(); } @@ -51,13 +68,22 @@ ) throws IOException { + if (logger.isDebugEnabled()) { + logger.debug("DefaultArtifact.out: " + identifier); + } } public void setup(String identifier, ArtifactFactory factory, Object context) { + if (logger.isDebugEnabled()) { + logger.debug("DefaultArtifact.setup: " + identifier); + } this.identifier = identifier; } public void endOfLife(Object context) { + if (logger.isDebugEnabled()) { + logger.debug("DefaultArtifact.endOfLife: " + identifier); + } } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8: