Skip to main content

LogCommitter

Logs data associated with every document crawled without saving them.

committer/coreJavadoc: LogCommitter

Notes​

Logs all document data to the application log without saving the documents to any persistent store. Useful for debugging and development to inspect what documents and fields the crawler produces. Not intended for production use.

Usage​

class: LogCommitter
acl:
flatPrefix: string
format: NATIVE
partial: REJECT
fieldMappings: {}
fieldMatcher:
ignoreCase: false
ignoreDiacritic: false
matchEmpty: false
method: BASIC
negateMatches: false
partial: false
pattern: string
replaceAll: false
trim: false
ignoreContent: false
logLevel: TRACE
restrictions:
- fieldMatcher: {}
valueMatcher: {}

Properties​

PropertyTypeRequiredDefault
aclAclCommitterConfigNoAclCommitterConfig
fieldMappingsRecord<string, string>No-
fieldMatcherTextMatcherNoTextMatcher
ignoreContentbooleanNofalse
logLevelenumNo-
restrictionsPropertyMatcher[]No-

Property Details​

acl​

How this committer sends the access control list (ACL) a document carries in its crawler.acl field, written by the fetchers that read a source's permissions:

  • format: JSON sends the field as it is; FLAT replaces it with plain fields (below); NATIVE writes it as the destination's own access control, for committers whose destination has one; NONE does not send it. When not set, the committer's default applies (NATIVE where available, otherwise JSON).
  • partial: what to do with a document whose permissions could only be read in part: REJECT (the default) or SEND.
  • flatPrefix: the prefix of the FLAT fields. Default is acl.

A document whose permissions cannot be vouched for is withheld: it is not sent, a version sent before is removed from the destination, and the crawler tries it again on its next run. That is the case when its ACL is partial and partial is REJECT, when its permissions could not be read at all, when the ACL is unreadable or of an unknown version, or when NATIVE cannot express it. A withheld document is never sent as readable by everyone.

With FLAT, acl.levels names the checks a person must pass, in order, and each level has an allow field and a deny field holding principals as kind:dir:id (or special:id):

acl.levels = share, file
acl.share.allow = group:ad:CORP:Sales
acl.file.allow = group:ad:CORP:Sales
acl.file.deny = group:ad:CORP:Interns
acl.owners = user:ad:CORP:pascal

A person may see the document if they match an allow value of every level and no deny value of any.

fieldMappings​

Mapping of source fields to target ones to be logged.

fieldMatcher​

Log values of matching field names. Leave empty to log values from all fields.

ignoreContent​

Do not log document content.

logLevel​

The log level used when printing values.

Allowed Values​

  • TRACE
  • DEBUG
  • INFO
  • WARN
  • ERROR
  • STDOUT
  • STDERR

restrictions​

Defines filter conditions that restrict which documents this committer processes. Documents not matching the restrictions are ignored by this committer.