diff --git a/mollom.admin.inc b/mollom.admin.inc
index 302f9d0..7edc45d 100644
--- a/mollom.admin.inc
+++ b/mollom.admin.inc
@@ -789,6 +789,19 @@ function mollom_admin_settings(&$form_state) {
     '#description' => t('Submitting "ham", "unsure", or "spam" on a protected form will trigger the corresponding behavior, and similarly, word verifications will only respond to "correct" and "incorrect", instead of the actual characters asked for. This option should be disabled in production environments.'),
   );
 
+  $form['mollom_logging_truncate'] = array(
+    '#type' => 'select',
+    '#title' => t('Truncate posts in diagnostic logs'),
+    '#default_value' => variable_get('mollom_logging_truncate', 'none'),
+    '#options' => array(
+      'none' => t('Disabled'),
+      '30' => t('@num characters', array('@num' => 30)),
+      '90' => t('@num characters', array('@num' => 90)),
+      '180' => t('@num characters', array('@num' => 180)),
+    ),
+    '#description' => t('Specify the amount of the submitted content to output in Mollom logs if you use a logging system that cannot hold an entire Mollom log entry, such as syslog. If you are unsure if this applies to you, leave disabled.'),
+  );
+
   return system_settings_form($form);
 }
 
diff --git a/mollom.module b/mollom.module
index 750a228..c9b7340 100644
--- a/mollom.module
+++ b/mollom.module
@@ -2306,6 +2306,18 @@ function _mollom_format_log(array $log) {
         while ($key !== NULL) {
           if (is_scalar($ref[$key]) || is_bool($ref[$key]) || is_null($ref[$key])) {
             $value = var_export($ref[$key], TRUE);
+            // Optionally truncate postBody for compatibility with syslog logging
+            if ($key == 'postBody' && variable_get('mollom_logging_truncate', 'none') != 'none') {
+              $chars = (int) variable_get('mollom_logging_truncate', '300');
+              // Sanity check
+              if ($chars < 10) {
+                $chars = 10;
+              }
+              if (strlen($value) > $chars) {
+                // Truncate to limit less 4 and replace trailing [partial] word with ellipsis
+                $value = preg_replace('/\s+?(\S+)?$/', ' ...', substr($value, 0, $chars - 4));
+              }
+            }
             // Indent all values to have a visual separation from the last.
             $flat_value .= str_repeat('  ', count($parents) + 1) . "{$key} = {$value}\n";
           }
