Codignator event log library. (PHP Framework)
Codeigniter library code (Logs), which creates the log in the database. <?php defined('BASEPATH') OR exit('No direct script access allowed'); class Event_logger { /** * ci * * @param instance object */ protected $CI; /** * log table name * * @param string */ private $_log_table_name = 'event_logs'; // We'll use a constructor, as you can't directly call a function // from a property definition. public function __construct() { // Assign the CodeIgniter super-object $this->CI =& get_instance(); $this->CI->load->database(); $this->_log_table_name = 'event_logs'; } /* Logger Function */ public function log_event($event,$data,$table,$unique_identifier="",$unique_identifier_value=''){ if(!$this->CI->db->table_exists($table) ) { echo "Event Logger : Table - $table does