[Tynstep-svn] r167 - trunk/step-web-server/src/main/java/com/tyndalehouse/step/web/server/service/impl

ChrisBurrell at crosswire.org ChrisBurrell at crosswire.org
Sat Jul 31 03:15:08 MST 2010


Author: ChrisBurrell
Date: 2010-07-31 03:15:08 -0700 (Sat, 31 Jul 2010)
New Revision: 167

Modified:
   trunk/step-web-server/src/main/java/com/tyndalehouse/step/web/server/service/impl/JSwordServiceImpl.java
Log:
extra logging in jsword wrapper service

Modified: trunk/step-web-server/src/main/java/com/tyndalehouse/step/web/server/service/impl/JSwordServiceImpl.java
===================================================================
--- trunk/step-web-server/src/main/java/com/tyndalehouse/step/web/server/service/impl/JSwordServiceImpl.java	2010-07-31 09:39:54 UTC (rev 166)
+++ trunk/step-web-server/src/main/java/com/tyndalehouse/step/web/server/service/impl/JSwordServiceImpl.java	2010-07-31 10:15:08 UTC (rev 167)
@@ -1,5 +1,6 @@
 package com.tyndalehouse.step.web.server.service.impl;
 
+import org.apache.log4j.Logger;
 import org.crosswire.common.util.Language;
 import org.crosswire.jsword.book.Book;
 import org.crosswire.jsword.book.BookData;
@@ -21,6 +22,9 @@
 // TODO go through implementing correct exception handling with runtime
 // exceptions being caught
 public class JSwordServiceImpl implements JSwordService {
+    // move to slf4j
+    private final Logger logger = Logger.getLogger(this.getClass());
+
     /*
      * (non-Javadoc)
      * 
@@ -33,7 +37,13 @@
             final Book currentBook = Books.installed().getBook(version);
             final BookData bookData = new BookData(currentBook, currentBook.getKey(reference));
 
-            return bookData.getOsisFragment();
+            final Element osisFragment = bookData.getOsisFragment();
+
+            if (logger.isDebugEnabled()) {
+                logger.debug("Reference requested was: " + version + " " + reference);
+            }
+
+            return osisFragment;
         } catch (final NoSuchKeyException e) {
             throw new InternalException("The verse specified was not found: [" + reference + "]", e);
         } catch (final BookException e) {




More information about the Tynstep-svn mailing list