Class DebugTransformerConfig
java.lang.Object
com.norconex.importer.handler.BaseLabelableConfig
com.norconex.importer.handler.BaseDocHandlerConfig
com.norconex.importer.handler.transformer.impl.DebugTransformerConfig
- All Implemented Interfaces:
Labelable
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:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanThe prefix to print before the actual log message.inthashCode()booleansetLogContent(boolean logContent) setLogFields(List<String> logFields) setLogLevel(String logLevel) The prefix to print before the actual log message.toString()Methods inherited from class com.norconex.importer.handler.BaseLabelableConfig
getLabel, setLabel
-
Constructor Details
-
DebugTransformerConfig
public DebugTransformerConfig()
-
-
Method Details
-
getLogFields
-
setLogFields
-
isLogContent
public boolean isLogContent() -
getLogLevel
-
getPrefix
The prefix to print before the actual log message.- Returns:
- log entry prefix
-
setLogContent
- Returns:
this.
-
setLogLevel
- Returns:
this.
-
setPrefix
The prefix to print before the actual log message.- Parameters:
prefix- log entry prefix- Returns:
this.
-
equals
- Overrides:
equalsin classBaseLabelableConfig
-
canEqual
- Overrides:
canEqualin classBaseLabelableConfig
-
hashCode
public int hashCode()- Overrides:
hashCodein classBaseLabelableConfig
-
toString
- Overrides:
toStringin classBaseLabelableConfig
-