Skip to main content

DebugTransformer

Logs document details for debugging during processing.

Notesโ€‹

This functionality help with troubleshooting of document importing. Place this transformer 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.

Parser Handler Compatibilityโ€‹

This functionality can be applied as either a pre-parse or post-parse handler.

Examplesโ€‹

The following logs the value of any document.reference and document.title document metadata fields.

handler:
class: DebugTransformer
logFields:
- document.reference
- document.title
logLevel: INFO

Usageโ€‹

Full configuration skeleton, with every option and its default
class: DebugTransformer
label: string
logContent: false
logFields:
- string
logLevel: string
prefix: string

Propertiesโ€‹

PropertyTypeRequiredDefault
labelstringNo-
logContentbooleanNofalse
logFieldsstring[]No-
logLevelstringNo-
prefixstringNo-

Property Detailsโ€‹

labelโ€‹

An optional, user-supplied label for this step in the importer pipeline. It has no effect on processing โ€” it exists purely to help identify this step, for example in large configurations or in the visual configurator.

logContentโ€‹

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

logFieldsโ€‹

Logs the document's metadata fields for debugging.

logLevelโ€‹

Specifies the logging level.

prefixโ€‹

Adds a custom prefix to log messages for identification.