DebugFilter Configuration

To configure a DebugFilter you must create a .properties file for it. It may contain the following property settings:

$class

This property must be set to com.escenic.syndication.xml.filter.DebugFilter.

filename

This must specify the path of the file to which output should be directed. For example:

filename=/var/log/escenic/import/pub1/xmldebug.log

If you include the string %c in the path it will be substituted by a counter that is incremented each time the debug filter is run. This, for example:

filename=/var/log/escenic/import/pub1/xmldebug_%c.log

will produce a series of files in /tmp/import/pub1 called xmldebug_1.log, xmldebug_2.log, etc.

You can also specify stdout or stderror in order to direct output to the console. For example:

filename=stdout

If, for example, you have created a transformation called iptc.xsl for converting the XML output by IPTCStreamFilter to syndication format, then to make use of the transformation, you could create an XSLFilter configuration called IPTCFilter.properties with the following content:

$class=com.escenic.syndication.xml.filter.XSLFilter
filter=./iptc.xsl

Given the example folder structure described in Creating Import Tasks, if you wanted to use the filter for the publication pub1 then you would place the file in configuration-root/import/pub1/filters, and set filter.jpg in configuration-root/import/pub1/ImportConfiguration.properties as follows:

SAXFilters.jpg=./filter/IPTCFilter

or (if you need to be able to see the input and output for debugging purposes):

SAXFilters.jpg=./filter/DebugFilter,./filter/IPTCFilter,./filter/DebugFilter

You will find a sample Debug properties file called XSLFilter.properties in the /engine/contrib/import/filter folder.