You are here

function messaging_log_format in Messaging 6.4

Same name and namespace in other branches
  1. 6.2 messaging.module \messaging_log_format()
  2. 6.3 messaging.module \messaging_log_format()
  3. 7 messaging_devel/messaging_devel.module \messaging_log_format()

Format logs

File

./messaging.module, line 993

Code

function messaging_log_format($logs) {
  $rows = array();
  foreach ($logs as $log) {
    list($type, $string, $append, $objects) = _messaging_log_format($log);

    // Full objects/arrays are only rendered when debug module is enabled
    if ($objects && function_exists('_messaging_debug_format_log')) {
      $text = _messaging_debug_format_log($type, $string, $append, $objects);
    }
    else {
      $text = $string;
      if ($append) {
        $text .= '<br />' . implode(' ', $append);
      }
    }
    $rows[] = array(
      $type,
      $text,
    );
  }
  return theme('table', array(
    t('Type'),
    t('Message'),
  ), $rows);
}