Class DebugTransformer

java.lang.Object
com.norconex.importer.handler.transformer.impl.DebugTransformer
All Implemented Interfaces:
Configurable<DebugTransformerConfig>, ConfigurableDocHandler<DebugTransformerConfig>, DocHandler

public class DebugTransformer extends Object implements ConfigurableDocHandler<DebugTransformerConfig>

A utility tagger to help with troubleshooting of document importing. Place this tagger anywhere in your handler configuration to print to the log stream the metadata fields or content so far when this handler gets invoked. This handler does not impact the data being imported at all (it only reads it).

The default behavior logs all metadata fields using the DEBUG log level. You can optionally set which fields to log and whether to also log the document content or not, as well as specifying a different log level.

Be careful: Logging the content when you deal with very large content can result in memory exceptions.

Can be used both as a pre-parse or post-parse handler.

See Also: