Ejemplo n.º 1
0
 /**
  * Returns all the column names of this table
  *
  * @return array
  */
 static function &fields()
 {
     if (!self::$_fields) {
         self::$_fields = array('id' => array('name' => 'id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('System Log ID'), 'description' => 'Primary key ID', 'required' => true), 'message' => array('name' => 'message', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('System Log Message'), 'description' => 'Standardized message', 'required' => true, 'maxlength' => 128, 'size' => CRM_Utils_Type::HUGE), 'context' => array('name' => 'context', 'type' => CRM_Utils_Type::T_LONGTEXT, 'title' => ts('Detailed Log Data'), 'description' => 'JSON encoded data'), 'level' => array('name' => 'level', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Detailed Log Data'), 'description' => 'error level per PSR3', 'maxlength' => 9, 'size' => CRM_Utils_Type::TWELVE, 'default' => 'info'), 'timestamp' => array('name' => 'timestamp', 'type' => CRM_Utils_Type::T_TIMESTAMP, 'title' => ts('Log Timestamp'), 'description' => 'Timestamp of when event occurred.', 'default' => 'CURRENT_TIMESTAMP'), 'contact_id' => array('name' => 'contact_id', 'type' => CRM_Utils_Type::T_INT, 'title' => ts('Log Contact ID'), 'description' => 'Optional Contact ID that created the log. Not an FK as we keep this regardless'), 'hostname' => array('name' => 'hostname', 'type' => CRM_Utils_Type::T_STRING, 'title' => ts('Log Host'), 'description' => 'Optional Name of logging host', 'maxlength' => 128, 'size' => CRM_Utils_Type::HUGE));
     }
     return self::$_fields;
 }