summaryrefslogtreecommitdiff
path: root/BKUViewer/src/main/java/at/gv/egiz/bku
diff options
context:
space:
mode:
Diffstat (limited to 'BKUViewer/src/main/java/at/gv/egiz/bku')
-rw-r--r--BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/SLXHTMLValidator.java10
-rw-r--r--BKUViewer/src/main/java/at/gv/egiz/bku/text/TextValidator.java10
2 files changed, 10 insertions, 10 deletions
diff --git a/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/SLXHTMLValidator.java b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/SLXHTMLValidator.java
index a230afa6..0ed34d07 100644
--- a/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/SLXHTMLValidator.java
+++ b/BKUViewer/src/main/java/at/gv/egiz/bku/slxhtml/SLXHTMLValidator.java
@@ -34,8 +34,8 @@ import javax.xml.validation.Schema;
import javax.xml.validation.SchemaFactory;
import javax.xml.validation.ValidatorHandler;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.xml.sax.Attributes;
import org.xml.sax.ContentHandler;
import org.xml.sax.InputSource;
@@ -78,7 +78,7 @@ public class SLXHTMLValidator implements at.gv.egiz.bku.viewer.Validator {
/**
* Logging facility.
*/
- private static Log log = LogFactory.getLog(SLXHTMLValidator.class);
+ private static Logger log = LoggerFactory.getLogger(SLXHTMLValidator.class);
private static Schema slSchema;
@@ -91,11 +91,11 @@ public class SLXHTMLValidator implements at.gv.egiz.bku.viewer.Validator {
SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
ClassLoader cl = SLXHTMLValidator.class.getClassLoader();
URL schemaURL = cl.getResource(SLXHTML_SCHEMA_FILE);
- log.debug("Trying to create SLXHTML schema from URL '" + schemaURL + "'.");
+ log.debug("Trying to create SLXHTML schema from URL '{}'.", schemaURL);
long t0 = System.currentTimeMillis();
slSchema = schemaFactory.newSchema(schemaURL);
long t1 = System.currentTimeMillis();
- log.debug("SLXHTML schema successfully created in " + (t1 - t0) + "ms.");
+ log.debug("SLXHTML schema successfully created in {}ms.", (t1 - t0));
} catch (SAXException e) {
log.error("Failed to load security layer XHTML schema.", e);
throw new RuntimeException("Failed to load security layer XHTML schema.", e);
diff --git a/BKUViewer/src/main/java/at/gv/egiz/bku/text/TextValidator.java b/BKUViewer/src/main/java/at/gv/egiz/bku/text/TextValidator.java
index dee8ff2e..5abaed11 100644
--- a/BKUViewer/src/main/java/at/gv/egiz/bku/text/TextValidator.java
+++ b/BKUViewer/src/main/java/at/gv/egiz/bku/text/TextValidator.java
@@ -25,8 +25,8 @@ import java.io.UnsupportedEncodingException;
import java.nio.CharBuffer;
import java.nio.charset.Charset;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import at.gv.egiz.bku.viewer.ValidationException;
import at.gv.egiz.bku.viewer.Validator;
@@ -37,7 +37,7 @@ public class TextValidator implements Validator {
/**
* Logging facility.
*/
- protected static Log log = LogFactory.getLog(TextValidator.class);
+ protected static Logger log = LoggerFactory.getLogger(TextValidator.class);
protected Font viewerFont;
@@ -46,7 +46,7 @@ public class TextValidator implements Validator {
}
private void invalid(char c) throws ValidationException {
- log.info("Invalid character (0x" + Integer.toHexString(c) + ") found.");
+ log.info("Invalid character (0x{}) found.", Integer.toHexString(c));
// TODO: localize
throw new ValidationException();
}
@@ -60,7 +60,7 @@ public class TextValidator implements Validator {
try {
reader = new InputStreamReader(is, charset);
} catch (UnsupportedEncodingException e) {
- log.info("Charset '" + charset + "' not supported.", e);
+ log.info("Charset '{}' not supported.", charset, e);
// TODO: localize
throw new ValidationException(e);
}