Problem/Motivation

When using syslog for watchdog, log entries are subject to truncating based on configuration or network protocol limits (which vary system to system). Mollom log entries contain important data for reporting issues to Mollom after the postBody field, which if too long results in loosing these data.

Suggested fix

Because it will be impossible to programmatically know what logging limits may be imposed, provide a combo selection of postBody truncate lengths in Mollom settings: no truncating (default), 300 chars, 600 chars, 1200 chars. Add ellipsis to truncated strings.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

emsearcy’s picture

Version: 6.x-2.0 » 6.x-2.x-dev
FileSize
2.37 KB

My initial estimate of 300, 600, 1200 was too high (I hadn't seen the rest of the log entry yet to know how much room needed to be left). My particular environment limit is 2048 chars and due to the repetition/batching of log info I found around 200 worked best for that limit. Many syslog environments only allow 1024 chars, though, so it could need to be lower.

The attached patch includes support for no truncating, 30, 90, and 180.

emsearcy’s picture

Revision, need to var_export the truncated postBody, not truncate the var_export'ed postBody (which causes the trailing quote to be stripped).