Package de.pangaea.metadataportal.utils
Class LoggingErrorListener
- java.lang.Object
-
- de.pangaea.metadataportal.utils.LoggingErrorListener
-
- All Implemented Interfaces:
ErrorListener
public final class LoggingErrorListener extends Object implements ErrorListener
Helper class to correctly logTransformerExceptions with Commons Logging.- Author:
- Uwe Schindler
-
-
Constructor Summary
Constructors Constructor Description LoggingErrorListener(Class<?> c)A error listener using the supplied class name as log target.LoggingErrorListener(org.apache.commons.logging.Log log)A error listener using the supplied Commons Logging instance as log target.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiderror(TransformerException e)Just throwse.voidfatalError(TransformerException e)Just throwse.voidwarning(TransformerException e)Logs message and location with WARN method.
-
-
-
Constructor Detail
-
LoggingErrorListener
public LoggingErrorListener(org.apache.commons.logging.Log log)
A error listener using the supplied Commons Logging instance as log target.
-
LoggingErrorListener
public LoggingErrorListener(Class<?> c)
A error listener using the supplied class name as log target.
-
-
Method Detail
-
error
public void error(TransformerException e) throws TransformerException
Just throwse.- Specified by:
errorin interfaceErrorListener- Throws:
TransformerException
-
fatalError
public void fatalError(TransformerException e) throws TransformerException
Just throwse.- Specified by:
fatalErrorin interfaceErrorListener- Throws:
TransformerException
-
warning
public void warning(TransformerException e) throws TransformerException
Logs message and location with WARN method.- Specified by:
warningin interfaceErrorListener- Throws:
TransformerException
-
-